how to solve this nonlinear equation to reach M2?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
madhan ravi
2019년 3월 31일
편집: madhan ravi
2019년 3월 31일
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]
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!