MATLAB Answers

0

Why don't i get a vector for phi1?

Asked by Tobias Stach on 24 May 2018
Latest activity Edited by Mischa Kim
on 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 Comments

Sign in to comment.

Products


Release

R2018a

1 Answer

Answer by Mischa Kim
on 24 May 2018
Edited by Mischa Kim
on 24 May 2018
 Accepted Answer

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 Comments

Sign in to comment.