Getting Error on limit calculation

조회 수: 4 (최근 30일)
farzad
farzad 2014년 12월 2일
댓글: Star Strider 2014년 12월 4일
Hi all
I get an error running these lines , but the functions are unknown
could someone tell me what the error is ?
R=1; D11=3;
A(1,:)=[((-R*log®/(2*D11))+R/(4*D11)) R/2 1/R 0]; syms ro;
limit(((-ro*log(ro)/(2*D11))+ro/(4*D11)),ro,0,'right');
syms ro;
limit ( 1/ro,ro, 0, 'right');
A(2,:)=[((-ro*log(ro)/(2*D11))+ro/(4*D11)) ro/2 1/ro 0];

채택된 답변

Star Strider
Star Strider 2014년 12월 3일
In calculating the limit of ((-ro*log(ro)/(2*D11))+ro/(4*D11)) you are essentially calculating the limit of -ro*log(ro) as ‘ro’ approaches 0 from the right (equating to 0*Inf), and adding it to ‘ro’. Since both terms equate to 0, the limit is 0. I don’t intend to sound critical, but it’s not even necessary to use a symbolic math program to see that.
In your second limit, 1/ro with the same conditions, the limit is +Inf.

추가 답변 (2개)

farzad
farzad 2014년 12월 2일
this is my error
The following error occurred converting from sym to double: Error using mupadmex Error in MuPAD command: DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use the VPA function instead.
Error in paryalimit (line 10) A(2,:)=[((-ro*log(ro)/(2*D11))+ro/(4*D11)) ro/2 1/ro 0];

farzad
farzad 2014년 12월 4일
Thank you very much Strider ,
shall you please elaborate , shall you tell me why it is not necessary to use symbolic math ?
my question is also , when we have log (ro) , and ro tends to zero , does it make a difference for matlab to use limit or replace directly ?
  댓글 수: 1
Star Strider
Star Strider 2014년 12월 4일
My pleasure!
You can certainly use a symbolic solver to do this or almost any problem that has an analytic solution and that is not so large that the solver cannot do it. It is simply obvious that -ro*log(ro) as ‘ro’ approaches zero is going to be zero. So is the second term.
I’m not certain how the Symbolic Math Toolbox calculates its limits (I never looked).

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by