Azzera filtri
Azzera filtri

how to solve this nonlinear equation to reach M2?

2 visualizzazioni (ultimi 30 giorni)
I want reach M2 from this code but i have problems with the solve function, should i use fsolve and how?
clc
clear
syms M2;
L=input('enter the L value\n');
D=input('enter the D value\n');
% P1=input('enter the P1 value\n');
% T1=input('enter the T1 value\n');
M1=input('enter the M1 value\n');
f=0.005;
Ls1=(((1-M1^2)/(1.4*(M1^2)))+((2.4/2.8)*log((2.4*(M1^2))/(2+0.4*(M1^2)))))*(D/(4*f));
disp(Ls1);
M20=0;
% if L<Ls1;
Ls2=Ls1-L;
M2=solve('(((1-M2^2)/(1.4*(M2^2)))+((2.4/2.8)*log((2.4*(M2^2))/(2+0.4*(M2^2)))))*(D/(4*f))- Ls2',M2);
disp(M2);
  2 Commenti
madhan ravi
madhan ravi il 31 Mar 2019
Modificato: madhan ravi il 31 Mar 2019
M2=solve((((1-M2^2)/(1.4*(M2^2)))+((2.4/2.8)*log((2.4*(M2^2))/(2+0.4*(M2^2)))))*(D/(4*f))- Ls2,M2); %?
[comment moved to answer section]

Accedi per commentare.

Risposta accettata

madhan ravi
madhan ravi il 31 Mar 2019

Più risposte (0)

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by