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 CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by