Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

solve value in matrix form

2 visualizaciones (últimos 30 días)
Sheryl
Sheryl el 10 de Mzo. de 2013
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I have a set of value, i'm trying to use matlab to calculate the value by set, however i cant get matlab to work with it with the code i generated.
this is the code i use, where c=[1 2 3 5], t=[5 9 7 6],
double( solve(c*(y*exp(-t/y)) ), y ) )
how cant i get y in a set of value?
  1 comentario
Walter Roberson
Walter Roberson el 10 de Mzo. de 2013
Please read the guide to tags and retag this Question; see http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags

Respuestas (1)

Walter Roberson
Walter Roberson el 10 de Mzo. de 2013
syms c t y
fun = matlabFunction( solve( c*(y*exp(-t/y)), y ), 'vars', {c t});
fun([1 2 3 5], [5 9 7 6])
  2 comentarios
Sheryl
Sheryl el 11 de Mzo. de 2013
why i always get this comment when i try out the code?
Warning: Explicit solution could not be found. > In solve at 169
is there anything wrong with my code?
Walter Roberson
Walter Roberson el 12 de Mzo. de 2013
exp(-t/y) is non-zero provided that -t/y is not -infinity.
y times a value is zero only if y is 0 or the value is 0.
So when is -t/y equal to -infinity? Never.
So for c * y*exp(-t/y) to be 0 with non-zero c, y must be 0, to get the y* part to be 0. But when it is, we have exp(-t/0) which is division by 0 which is undefined. And 0 times undefined is undefined.
Thus there is no value for which c * y * exp(-t/y) is 0 for finite non-zero c and t, so solve() must say that no solutions can be found.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by