Attempt to execute SCRIPT dsolve as a function:

3 次查看(过去 30 天)
Hello everybody.
I need to solve a system of 3 differential equations plus a not differential one.
I tried that:
syms x y z w real
S = dsolve('Dx -(((a*(x^2+Tamb^2)*(x+Tamb)*(Tamb-x)+ (b*(x^2+Tamb^2)*(x+Tamb)+c)*(y-x)+d))/e) = 0',...
'Dy -(((a*(x^2+Tamb^2)*(x+Tamb))*(x-y)+(f*(z-y))+((Tamb-y)/g)+(h-i*(1-l*(y - T_ref))))/m) = 0',...
'Dz -((f*(y-z)-n*(w-Tf0))/o)=0',...
'Dw - 2*z+Tf0 = 0',...
'x(0)=Tamb', 'y(0)=299', 'z(0)=288','w(0)=1',...
'IgnoreAnalyticConstraints', 'none');
but it tells me:
??? Attempt to execute SCRIPT dsolve as a function:
C:\Users\.........\dsolve.m
Error in ==> dsolve at 25
S = dsolve('Dx -(((a*(x^2+Tamb^2)*(x+Tamb)*(Tamb-x)+
(b*(x^2+Tamb^2)*(x+Tamb)+c)*(y-x)+d))/e) = 0',...
Where is the error?
Thank you very very much
  1 个评论
Valentina
Valentina 2012-3-17
It gave me this error:
??? Error using ==> mupadmex
Error in MuPAD command: Illegal equations [ode::new]
Error in ==> sym.sym>sym.mupadmexnout at 2018
out = mupadmex(fcn,args{:});
Error in ==> dsolve>mupadDsolve at 190
[var_list,R] = mupadmexnout('symobj::dsolve',sys,x,ignoreConstraints);
Error in ==> dsolve at 97
[R,vars] = mupadDsolve(ignoreConstraints,varargin{1:narg});
Error in ==> RisolutoreMySYST at 130
S = dsolve('Dx - (((a*(x^2+Tamb^2)*(Tamb-x)+ b*(((0.0552*Tamb^1.5)^4)-x^4) +
b*(Tamb^4-x^4)+ c*(y-x) + d))/e) = 0',...
What's that?

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2012-3-17
You named your own file dsolve and that is interfering with calling the MATLAB dsolve
  3 个评论
berkeley
berkeley 2013-1-9
编辑:berkeley 2013-1-9
Hi,Walter
I try to solve Dx=Ax; while x is of 2*1 elements,
A=[2 1;3 2];f=dsolve('Dx=A*x','x(0) = [32 20]');
Warning: Explicit solution could not be found. > In dsolve at 101
Not so surprising, no Explicit solution ,at leaast no errors.
But when I change x to 3*1 elements, it comes the following errors, so amazing!!!
Thanks for your help
A=[1 2 1;1 5 6;4 2 1]; f=dsolve('Dx=A*x','x(0) = [20;20;20]');
??? Error using ==> mupadmex
Error in muPAD command: Illegal equations [ode::new]
Error in ==> sym.sym>sym.mupadmexnout at 2003 out = mupadmex(fcn,args{:});
Error in ==> dsolve>mupadDsolve at 190 [var_list,R] = mupadmexnout('mllib::dsolve',sys,x,ignoreConstraints);
Error in ==> dsolve at 97 [R,vars] = mupadDsolve(ignoreConstraints,varargin{1:narg});

请先登录,再进行评论。

更多回答(0 个)

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by