Info

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

Want to solve for x

1 visualización (últimos 30 días)
Mary Jean Savitsky
Mary Jean Savitsky el 10 de Abr. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
k=0.0023;
extent1=((100*x-2*x^2)/(1625-115*x+2*x^2))==k*(1);
solve (extent1,x)
I want to solve for x but when i input this I get the solution in the form of a formula instead of a number. How can I change is to that once it runs, the solution comes out in the form of a number
  1 comentario
James Tursa
James Tursa el 10 de Abr. de 2020
Editada: James Tursa el 10 de Abr. de 2020
E.g.,
>> syms x
>> k=0.0023;
extent1=((100*x-2*x^2)/(1625-115*x+2*x^2))==k*(1);
solve (extent1,x)
ans =
334215/13364 - (5*40092004761^(1/2))/40092
(5*40092004761^(1/2))/40092 + 334215/13364
>> double(ans)
ans =
0.0373
49.9799
Note that this is really just polynomial roots. E.g.,
>> roots([-2 100 0] - k*[2 -115 1625])
ans =
49.9799
0.0373

Respuestas (1)

Steven Lord
Steven Lord el 10 de Abr. de 2020
Call double or vpa on the output of solve.

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