Why don't i get a vector for phi1?

1 Ansicht (letzte 30 Tage)
Tobias Stach
Tobias Stach am 24 Mai 2018
Bearbeitet: Mischa Kim am 24 Mai 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)));

Akzeptierte Antwort

Mischa Kim
Mischa Kim am 24 Mai 2018
Bearbeitet: Mischa Kim am 24 Mai 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.

Weitere Antworten (0)

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!