MATLAB Answers

0

Why don't i get a vector for phi1?

Tobias Stach 님이 질문을 제출함. 24 May 2018
최근 활동 Mischa Kim 님이 편집함. 24 May 2018
t = pi/2:0.01:2*pi+(pi/2);
phi1 = (a^2+a^2+d^2+2*a*d*cos(pi-t)-d^2)/(2*b*sqrt(a^2+d^2+2*a*d*cos(pi-t)));

  댓글 수: 0

로그인 to comment.

태그

제품


릴리스

R2018a

답변 수: 1

Mischa Kim 님의 답변 24 May 2018
Mischa Kim 님이 편집함. 24 May 2018
 채택된 답변

All constants need to be defined. Then use:
t = pi/2:0.01:2*pi+(pi/2);
phi1 = (a^2+a^2+d^2+2*a*d*cos(pi-t)-d^2)./(2*b*sqrt(a^2+d^2+2*a*d*cos(pi-t)));
plot(t, phi1)
t is a vector, therefore, you need to use the ./ operator.

  댓글 수: 0

로그인 to comment.



Translated by