필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Numerical computation using Matlab

조회 수: 1 (최근 30일)
Muhammad Bilal
Muhammad Bilal 2020년 7월 23일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi,
I am trying to solve the expression for theta with T as an input:
Input: T
Output: theta
How can i solve to find the solution for a range of T?
Ls = 0.090;
r1 = 0.035;
Ks = 445e3;
xp = 0.1403;
func = Ks .*((sqrt((r1^2 + xp^2) - (2.*r1.*xp.*cos(theta))))...
- Ls).*r1.*(xp./(sqrt((r1^2 + xp^2) - (2.*r1.*xp.*cos(theta))))).*sin(theta) - T;

답변 (1개)

Alan Stevens
Alan Stevens 2020년 7월 23일
Here's a (not very elegant!) way:
Ls = 0.090;
r1 = 0.035;
Ks = 445e3;
xp = 0.1403;
theta0 = 0;
TT = 0:50:500;
Theta = zeros(size(TT));
for i = 1:length(TT)
T = TT(i);
func = @(theta) Ks.*((sqrt((r1^2 + xp^2) - (2.*r1.*xp.*cos(theta))))...
- Ls).*r1.*(xp./(sqrt((r1^2 + xp^2) - (2.*r1.*xp.*cos(theta))))).*sin(theta) - T;
Theta(i) = fzero(func, theta0);
end
plot(TT,Theta*180/pi),grid
xlabel('T'), ylabel('\theta [degrees]')

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by