Info

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

proble in using "solve function

1 visualización (últimos 30 días)
vikas
vikas el 20 de En. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
i am using solve function to equate two equations but the result are not the one that i want and also have problem with the format of the result . the exp. is
[L D] = solve(L*(D-d)==0.1386,L/(D-d)==3.6,'Real',true)
==============
the result is in fraction form or some times show empty matrix
  1 comentario
Walter Roberson
Walter Roberson el 20 de En. de 2014
L = (9/250)*sqrt(385), D = (1/100)*sqrt(385)+d
L = -(9/250)*sqrt(385), D = -(1/100)*sqrt(385)+d

Respuestas (2)

Mischa Kim
Mischa Kim el 20 de En. de 2014
Editada: Mischa Kim el 20 de En. de 2014
Have you assigned a numeric value for d ?
syms L D
d = 1;
[L D] = solve(L*(D-d)==0.1386,L/(D-d)==3.6,'Real',true)
L =
385^(1/2)/100 + 1
1 - 385^(1/2)/100
D =
(9*385^(1/2))/250
-(9*385^(1/2))/250
double(L(1))
ans =
1.196214168703486
  1 comentario
vikas
vikas el 20 de En. de 2014
i have assigned value for d=0.1382 and i am getting the results same as yours but i want to get results in the format "double(L(1))" without using this code

Walter Roberson
Walter Roberson el 20 de En. de 2014
  3 comentarios
vikas
vikas el 22 de En. de 2014
when i used * L=sym('L','positive'); D=sym('D','positive'); solve(L*(D-d)-Aw,L/(D-d)-3.6,'Real',true) *
i got result
ans =
D: [1x1 sym]
L: [1x1 sym]
i have to select only one value of L and D which are dimensions
Walter Roberson
Walter Roberson el 22 de En. de 2014
S = solve(L*(D-d)-Aw,L/(D-d)-3.6,'Real',true);
S.D
S.L
and if appropriate,
double(S.D)
double(S.L)

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