Solving an equation help
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Cizzxr
am 17 Mär. 2021
Kommentiert: Cizzxr
am 17 Mär. 2021
So i have an equation shown as 'eqn' shown below, I am trying to solve for M but for some reason my code isnt running and im not sure why, any help would be appreciated
a = 1.4;
x = -0.5:0.1:0.5;
b = 0.153 + x.^2;
A1 = 0.153;
F2 = (b./A1);
eqn = F2 == ((a+1)./2).^((-a+1)/2.*(a-1)).*(((1+((a-1)./2)*M.^2).^((a+1)/2.*(a-1)))./M);
s = solve(eqn);
3 Kommentare
Akzeptierte Antwort
Walter Roberson
am 17 Mär. 2021
a = 1.4;
x = -0.5:0.1:0.5;
b = 0.153 + x.^2;
A1 = 0.153;
F2 = (b./A1);
syms M real
assume(M>0)
eqn = F2 == ((a+1)./2).^((-a+1)/2.*(a-1)).*(((1+((a-1)./2)*M.^2).^((a+1)/2.*(a-1)))./M);
s = arrayfun(@vpasolve, eqn);
vpa(s,5)
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!