how can I solve this problem
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Gloria
el 31 de Jul. de 2022
Comentada: Star Strider
el 31 de Jul. de 2022
v=0.001;
L=0.084;
D=0.042;
R=0.02;
C=0.001;
sm= v*N*L*R*L^2/(4*W*C^2);
sm=(1-p^2)^2/p*((16*p^2+pi^2*(1-p^2))^0.5;
p=?
0 comentarios
Respuesta aceptada
Star Strider
el 31 de Jul. de 2022
Editada: Star Strider
el 31 de Jul. de 2022
I have no idea what you want, especially with two expressions for ‘sm’ and several variables undefined, so taking a wild guess —
syms N W p
sympref('AbbreviateOutput',false);
v=0.001;
L=0.084;
D=0.042;
R=0.02;
C=0.001;
sm1 = v*N*L*R*L^2/(4*W*C^2);
sm = (1-p^2)^2/p*(16*p^2+pi^2*(1-p^2))^0.5 == sm1;
ps = solve(sm, p, 'ReturnConditions',1)
p = ps.p
condx = ps.conditions
To get a numerical result, supply values for the currently undefined variables, then one of these:
p = vpa(ps.p)
p = double(ps.p)
depending on the desired result.
EDIT — Corrected typographical error. .
6 comentarios
Más respuestas (1)
Matt J
el 31 de Jul. de 2022
Editada: Matt J
el 31 de Jul. de 2022
Are N and W known variables? Your code does not provide them, but if they are known, you can reorganize as a polynomial and use roots,
v=0.001;
L=0.084;
D=0.042;
R=0.02;
C=0.001;
N=1;W=1; %fake
sm= v*N*L*R*L^2/(4*W*C^2);
syms p
pol=sym2poly( sm^2*p^2*(16*p^2+pi^2*(1-p^2)) - (1-p^2)^4 )
p=roots(pol) %the solutions
0 comentarios
Ver también
Categorías
Más información sobre Number Theory en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!