Borrar filtros
Borrar filtros

How to plot several signals in 3D

19 visualizaciones (últimos 30 días)
ABDEL KARIM ABDEL KARIM
ABDEL KARIM ABDEL KARIM el 16 de Sept. de 2021
Comentada: ABDEL KARIM ABDEL KARIM el 17 de Sept. de 2021
How can I plot a similar image?
Thank you for your reply,
I'd appreciate if you can give me an example using the below information and I'll adapt it later to my data :
time = 0 : 10e-5 : 2e-2;
y1 = sin(2*pi*50*t);
y2 = sin(2*pi*100*t);
z = [0 5];

Respuesta aceptada

Chunru
Chunru el 16 de Sept. de 2021
Editada: Chunru el 16 de Sept. de 2021
t = 0 : 10e-5 : 2e-2;
y1 = sin(2*pi*50*t);
y2 = sin(2*pi*100*t);
f = [0 2 4];
plot3(t, f(1)*ones(size(t)), y1);
hold on
plot3(t, f(2)*ones(size(t)), y2);
plot3(t, f(3)*ones(size(t)), y2);
%box on;
hAxis = gca;
hAxis.XRuler.FirstCrossoverValue = 0; % X crossover with Y axis
hAxis.XRuler.SecondCrossoverValue = 0; % X crossover with Z axis
hAxis.YRuler.FirstCrossoverValue = 0; % Y crossover with X axis
hAxis.YRuler.SecondCrossoverValue = 0; % Y crossover with Z axis
hAxis.ZRuler.FirstCrossoverValue = 0; % Z crossover with X axis
hAxis.ZRuler.SecondCrossoverValue = 0; % Z crossover with Y axis
grid on
xlabel('t')
ylabel('f')
zlabel('Amp')
view(20, 60)

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by