MatLab Equation - Two Unknowns

조회 수: 2 (최근 30일)
Eddy Ramirez
Eddy Ramirez 2021년 3월 6일
댓글: Eddy Ramirez 2021년 3월 10일
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);

답변 (1개)

Sai Veeramachaneni
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.
  댓글 수: 1
Eddy Ramirez
Eddy Ramirez 2021년 3월 10일
yeah i saw that after and i also had some typos there thank you for your feedback!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by