i wanna to plot the eulars formula on matlab with 3d plot
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Muhammad
am 26 Jun. 2021
Bearbeitet: Jan
am 26 Jun. 2021
t = -1:1:1;
eulars formual
x= cos(wt)+jsin(wt);
we shoul have 3d plot like this

sig=2;
x = cos(sig*t) + sin(sig*t)*i;
z= cos(sig*t);
y=sin(sig*t)*i;
plot3(x,y,z)
0 Kommentare
Akzeptierte Antwort
Star Strider
am 26 Jun. 2021
Try this —
t = linspace(0, 3*pi);
sig=2;
x = cos(sig*t) + sin(sig*t)*1i;
z = cos(sig*t);
y = sin(sig*t)*i;
figure
plot3(t,real(x)+0.5,imag(x)+0.5, 'LineWidth',2)
hold on
plot3(t, real(x), zeros(size(x))-1, 'LineWidth',2)
plot3(t, zeros(size(x))+2, imag(x), 'LineWidth',2)
hold off
grid on
I will let you experiment with to understand how it works!
.
0 Kommentare
Weitere Antworten (1)
Jan
am 26 Jun. 2021
Bearbeitet: Jan
am 26 Jun. 2021
t = linspace(-1, 1, 200);
r = cos(2 * pi * t) + 1i * sin(2 * pi * t);
figure;
plot3(t, real(r), imag(r), 'Color', 'k', 'LineWidth', 3);
hold('on');
plot3(t, repmat(-2, size(r)), imag(r), 'Color', 'k', 'LineStyle', '-');
plot3(t, real(r), repmat(-2, size(r)), 'Color', 'k', 'LineStyle', '-.');
axis equal
xlabel('t (sec)');
ylabel('Real Axis');
zlabel('Imag Axis');
xlim([-2, 2])
ylim([-2, 2])
grid('on');
view(-120, 20);
Do you see, that the imaginary axis is mirrored compared to your diagram? Your diagram shows:
r = cos(2 * pi * t) - 1i * sin(2 * pi * t);
% ^
0 Kommentare
Siehe auch
Kategorien
Mehr zu Performance and Memory finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

