필터 지우기
필터 지우기

Attempt to execute SCRIPT dsolve as a function:

조회 수: 5 (최근 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 CenterFile Exchange에서 Utilities for the Solver에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by