problem using solve
2 views (last 30 days)
Show older comments
Trying to find equilibrium solutions for a simple ODE system using matlab 7.10. The following commands were entered (commands based on earlier versions of matlab) with errors messages included:
dn1 = 'r*n1*(k-n1)/k-c*(1-exp(-a*n1/c))*n2'
dn2 = 'b*c*(1-exp(-a*n1/c))*n2-d*n2'
[n1hat,n2hat] = solve(dn1,dn2,'n1,n2') ??? Error using ==> mupadmex Error in MuPAD command: Division by zero [_power]; during evaluation of 'ff'
Error in ==> sym.sym>sym.mupadmexnout at 2003 out = mupadmex(fcn,args{:});
Error in ==> solve at 76 [symvars,R] = mupadmexnout('mllib::solvefull',eqns,vars);
Any suggestions?
0 Comments
Answers (1)
Walter Roberson
on 17 Sep 2011
Try
[n1hat,n2hat] = solve(dn1,dn2,'n1', 'n2')
with the two variables to solve for separated.
2 Comments
Walter Roberson
on 19 Sep 2011
I don't know. This appears to be something specific to MuPAD, and possibly even to the MuPAD version. The solution set is:
n1 = 0, n2 = 0
n1 = k, n2 = 0
n1 = -ln((b*c-d)/(b*c))*c/a, n2 = -r*ln((b*c-d)/(b*c))*c*b*(k*a+ln((b*c-d)/(b*c))*c)/(k*d*a^2)
See Also
Categories
Find more on Get Started with MuPAD in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!