Azzera filtri
Azzera filtri

Attempt to execute SCRIPT dsolve as a function:

5 visualizzazioni (ultimi 30 giorni)
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 Commento
Valentina
Valentina il 17 Mar 2012
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?

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 17 Mar 2012
You named your own file dsolve and that is interfering with calling the MATLAB dsolve
  3 Commenti
berkeley
berkeley il 9 Gen 2013
Modificato: berkeley il 9 Gen 2013
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 il 9 Gen 2013
Please start a new Question for this.

Accedi per commentare.

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by