easy question : why i get NaN here ?

1 visualización (últimos 30 días)
yahya elyan
yahya elyan el 30 de Mayo de 2020
Respondida: Walter Roberson el 31 de Mayo de 2020
>> u=1/(1+limit(K/(w*(((J*w+b)*(L*w+R))+K^2)),w,0))
or
>> limit(K/(w*(((J*w+b)*(L*w+R))+K^2)),w,0)
  6 comentarios
yahya elyan
yahya elyan el 30 de Mayo de 2020
Editada: yahya elyan el 30 de Mayo de 2020
UP
yahya elyan
yahya elyan el 30 de Mayo de 2020
it can be solved by using
>>U=1/(1+limit((K/(H*((J*H+b)*(L*H+R)+K^2))),H,0,'right'));

Iniciar sesión para comentar.

Respuesta aceptada

yahya elyan
yahya elyan el 30 de Mayo de 2020
try using
U=1/(1+limit((K/(H*((J*H+b)*(L*H+R)+K^2))),H,0,'right'));
  2 comentarios
madhan ravi
madhan ravi el 30 de Mayo de 2020
Editada: madhan ravi el 30 de Mayo de 2020
It is solved but do you know the reason for NaN xD? Because your original question asks “why...?”
yahya elyan
yahya elyan el 30 de Mayo de 2020
Editada: yahya elyan el 30 de Mayo de 2020
yah if i remember well it was about being unable to approach zero for solving limit so we usually took 0+ or 0- value thats a way instead of using lupital xD

Iniciar sesión para comentar.

Más respuestas (1)

Walter Roberson
Walter Roberson el 31 de Mayo de 2020
J = 0.01;
b = 0.0737;
K = 0.072;
R = 1.17;
L = 0.024;
syms w
temp = K/(w*(((J*w+b)*(L*w+R))+K^2));
tempc = collect(temp, w);
disp(tempc)
ans =
120000/(400*w^3 + 22448*w^2 + 152355*w)
Examing this, we see that as w approaches 0, the controlling expression would be the 152355*w part -- the w^3 and w^2 parts would vanish compared to the w component. So the limit of temp as w goes to 0 would be like
limit( (120000/152355)/w, w, 0)
When w approaches from the right, that is positive divided by +0, which is +infinity
When w approaches from the left, that is positive divided by -0, which is -infinity
Therefore the left and right limits are different, so the limit is not defined.

Etiquetas

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by