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

1 回表示 (過去 30 日間)
rahim njie
rahim njie 2021 年 7 月 29 日
コメント済み: darova 2021 年 8 月 1 日
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;

採用された回答

darova
darova 2021 年 7 月 29 日
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 件のコメント
darova
darova 2021 年 8 月 1 日
I don't understand the question. If wi, wj and wk are vecors then W is also a vector

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by