Solution of radical equation

조회 수: 8 (최근 30일)
Muhammad Hassaan Bin Tariq
Muhammad Hassaan Bin Tariq 2022년 9월 28일
답변: Walter Roberson 2022년 10월 5일
I am solving the function but the values are not correct. Is there any problem with the coding?
%% Calculation_of_speed_ratio
A = 16000; % N
B = 125.66; % mm^2
for cycles = 10:10
t=cycles*0.1
syms f
fn = (0.044*A/B)*2.5*pi/3*((6.75*f/sqrt(45.5+f^2))+(32*f/sqrt(64+f^2))+(9.25*f/sqrt(85.5+f^2))) == 1216.7*sin(62.838*t);
x= vpasolve(fn,f)
plot(t,x,"o")
hold on
end
I have tried to set an interval but it is not giving solution e.g. [5,180]. It is returning an empty solution.
Thank you for the help in advance.
Regards

답변 (2개)

Walter Roberson
Walter Roberson 2022년 10월 5일
We would not know if the code is correct as you did not show us the equations. We would, for example, not know whether the sin() term is meant to be dealing with degrees instead of radians.
If you
G=lhs(fn)-rhs(fn)
fplot(G, [0.01 180])
Then you will see that the equation is continuous monotonic and so has only one solution, which is around 0.08. it is therefore not a matter of vpasolve missing a root: vpasolve is giving back the only positive root.

Santosh Fatale
Santosh Fatale 2022년 10월 4일
Hi Muhammad,
I tried out the code shared by you and it looks like you need to declare variable f as Symbolic variable. You can do it in the same line where you are declairing variable "n_b".
  댓글 수: 1
Muhammad Hassaan Bin Tariq
Muhammad Hassaan Bin Tariq 2022년 10월 5일
I missed the declaration while copying the code. I have declared the variable as I have edited the code in the question now.
Regards

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

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by