필터 지우기
필터 지우기

Solve a transcendental equation

조회 수: 8 (최근 30일)
Dimitrios Anagnostou
Dimitrios Anagnostou 2023년 5월 4일
답변: Piyush Patil 2023년 5월 31일
I know it is simple but I am puzzled how to force Matlab to solve the following equation
to get
This is what I do (assuming and ; is the coefficient of static friction between a body and an incline plane and θ is the inclination angle):
syms theta mu_s positive
assume(theta > 0 & theta < pi/2)
eq = sin(theta) == mu_s*cos(theta);
sol = solve(eq, theta, 'Real', true, 'ReturnConditions', true, 'PrincipalValue', true);
simplify(sol.theta)
ans = 
Any ideas? Thank you very much!

채택된 답변

Piyush Patil
Piyush Patil 2023년 5월 31일
Hello Dimitrios,
One way to force MATLAB to solve the given equation so that you can get the desired result is that try to rearrange the equation and then provide it to MATLAB.
You can write as
So your code will be -
syms theta mu_s positive
assume(theta > 0 & theta < pi/2)
% rearrange the equation
eq = tan(theta) == mu_s;
sol = solve(eq, theta, 'Real', true, 'ReturnConditions', true, 'PrincipalValue', true);
simplify(sol.theta)
By doing this, you will get solution as -
Hope this helps!

추가 답변 (0개)

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by