Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Numerical computation using Matlab

1 visualización (últimos 30 días)
Muhammad Bilal
Muhammad Bilal el 23 de Jul. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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;

Respuestas (1)

Alan Stevens
Alan Stevens el 23 de Jul. de 2020
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]')

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by