Edward Rozema

61 Reputation

5 Badges

19 years, 245 days

MaplePrimes Activity


These are questions asked by Edward Rozema

I am trying to use Optimization[LSSolve] to fit the solution to a differential equations to data. I can solve my problem using Matlab, but I'd like to be able to use Maple as well. This is Maple 10. The proc is not getting the values of the parameters. > data := [[0,95], [11,425], [22, 928], [33,1358], [44,1589], [56,1683], [67,1724]]: > try2 := proc(K,alpha,r,IC) local DE1,R; print(K,alpha,r,IC): # for debugging DE1:=diff(y(t),t)=r/alpha*y(t)*(1-(y(t)/K)^alpha); R:=dsolve({DE1,y(0)=IC},numeric); map((d) -> rhs(R(d[1])[2])-d[2],data): end: > sol2 := Optimization[LSSolve](try2(K,alpha,r,IC), initialpoint = {r=.09, K=1750, IC=95, alpha=.3});
Page 1 of 1