how do i continuously calculate an output with an increasing input of angles ?

3 vues (au cours des 30 derniers jours)
rahim njie
rahim njie le 29 Juil 2021
Commenté : darova le 1 Août 2021
i am trying to caluculate 'W' at angles between 0-60 degrees. im not sure how to create a loop function that will allow me to continuously calculate this output whilst varing the angle. I tried using 'theta = 0:60' but that caused an error. my code so far:
theta=(0:60);
w_s = 10; % angular velocity of spin
a_s = 6; % angualar acceleration of spin
w_n = 3; % angular velocity of nutation
a_n = 2; % augalar acceleration of nutation
w_p = 5; % angular velocity of precession
a_p = 4; % angular acceleration of precession
%% Geometry values
rA = [0 7.4103 7.1651];
%% vectors
vw_s = [0 w_s*sind(theta) w_s*cosd(theta)];% spin vector
vw_p = [0 0 w_p]; % precession vector
vw_n = [-w_n 0 0]; % nutation vector
%% Angualar velocity
wi = [-w_n 0 0]; % i component of W
wj = [0 w_s*sind(theta) 0]; % j component W
wk = [ 0 0 (w_p + w_s*cosd(theta))]; % k component of W
W = wi + wj + wk; % Angular Velocity;

Réponse acceptée

darova
darova le 29 Juil 2021
You need to make wi vector the same size as wj and wk
wi = [-w_n+theta*0 0 0]; % i component of W
  3 commentaires
darova
darova le 1 Août 2021
I don't understand the question. If wi, wj and wk are vecors then W is also a vector

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Clocks and Timers dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by