Attempt to execute SCRIPT dsolve as a function:

1 回表示 (過去 30 日間)
Valentina
Valentina 2012 年 3 月 17 日
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});
Walter Roberson
Walter Roberson 2013 年 1 月 9 日
Please start a new Question for this.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeUtilities for the Solver についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by