Question: Optimization[LSSolve] with dsolve

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}); K, alpha, r, IC Error, (in dsolve/numeric) invalid specification of initial conditions
Please Wait...