g=9.81;
Vo=10;
ang= [30 45 60 80];
t=sqrt(sin(ang).^2-0.5*sin(ang))
t=[t -t];
x=Vo*(cos(ang).*t) WHY I KEEP GETTING "MATRIX DIMENSIONS MUST AGREE"
y = Vo*(sin(ang).*t)-(0.5*g*(t^2));
tmax=2*Vo/g*sin(ang);
y=y(x);

 채택된 답변

madhan ravi
madhan ravi 2019년 2월 6일
편집: madhan ravi 2019년 2월 6일

0 개 추천

  • First for some reason you make t twice as large than it previously was
t=[t -t] % see here
  • And then you try to multiply it with ang which is half of t.
  • numel(t) should be equal to numel(ang) to prevent that error.

댓글 수: 1

Salma A Pantaleon Damaso
Salma A Pantaleon Damaso 2019년 2월 6일
I was trying to put t= sin(ang)± (sqrt sin(ang)−0.5)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by