how to calculate theta

4 ビュー (過去 30 日間)
Aidan Palermo
Aidan Palermo 2021 年 9 月 20 日
回答済み: Walter Roberson 2021 年 9 月 20 日
theta = 0:1:90;
3010 == Xo + (V .* cosd(theta)) .* t
I'm trying to calculate the angle needed to travel 3010 ft but I keep getting this error message
Arrays have incompatible sizes for this operation.
Error in lab2 (line 30)
3010 == Xo + (V .* cosd(z)) .* t
  2 件のコメント
Walter Roberson
Walter Roberson 2021 年 9 月 20 日
What is size(t)
Aidan Palermo
Aidan Palermo 2021 年 9 月 20 日
t = linspace(0, 5, 900);

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

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 9 月 20 日
Xo = 1234;
V = 20000;
syms theta
t = .1:.1:1;
eqn = 3010 == Xo + (V .* cosd(theta)) .* t
eqn = 
thetas = double(arrayfun(@(E) vpasolve(E), eqn));
plot(t, thetas)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by