MatLab Equation - Two Unknowns
조회 수: 2 (최근 30일)
이전 댓글 표시
I am running the coding below, and under the length correction I have two unknown variables and when I start the debugging portion and I look up equation 2 only shows
0.89761904761904761904761904761905 == 1 - tan(h)
instead of the entire equation
Nl_Final==(1-((tan(h)*(n*s_AR))/(n*s_AR)));
Any ideas as to why? I am sure MatLab is not ignoring the rest of the values (at least thats what I hope) or am i missing something
clear all;
clc;
E1=39.1*1e9;
Vf=0.60;
Vm=1-Vf;
Df=10;
r=Df/2;
Ef=70*1e9;
Em=3.5*1e9;
vm=.36;
Nl=sym('N_l');
h=sym('h');
s_AR=sym('s_f');
lf=sym('l');
r0=r/sqrt(Vf);
Gm=Em/(2*(1+vm));
n=sqrt((2*(Gm))/(Ef*log(r0/r)));
%%BETA VALUES%%
b_eta=sqrt((2*(Gm))/(Ef*r^2*log(r0/r)));
b_eta1=sqrt(n^2/r^2);
%%EFFECTIVE MODULUS finding length%%
equation1=E1==Ef*Vf*Nl+Vm*Em;
solution1=solve(equation1);
Nl_Final=vpa(solution1);
%%LENGTH CORRECTION FINDING h%%
equation2=Nl_Final==(1-((tan(h)*(n*s_AR))/(n*s_AR)));
equation2_1=Nl_Final==(1-((tan(h)*((b_eta*lf)/2))/((b_eta*lf)/2)));
solution2=solve(equation2);
solution2_1=solve(equation2_1);
h_Final=vpa(solution2*1000);
h_Final_1=vpa(solution2_1*1000);
댓글 수: 0
답변 (1개)
Sai Veeramachaneni
2021년 3월 9일
Hi,
Nl_Final==(1-((tan(h)*(n*s_AR))/(n*s_AR)));
In the above equation n*s_AR is getting cancelled out in numerator and denominator which results in
Nl_Final==(1-tan(h))
Hence you are getting equation2 values as
0.89761904761904761904761904761905 == 1 - tan(h)
Hope it helps.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!