how to make a vertical plot?
17 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hellodarling
el 13 de Oct. de 2022
Respondida: David Hill
el 13 de Oct. de 2022
Hi everyone,
I would like to vertical plot with this script.
Thanks in advance!
My script is below.
clear all; clc; close all;
r=[0 0 0 0 0 0 0 0 0 0 0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0 0 0 0 0 0 0 0 0 0 0 ];
w=[0 0 -0.5 0 1 2 1 0 -0.5 0 0];
s=conv(r,w);
dt=0.001;
Nr=length(r);
Nw=length(w);
N=length(s);
t=(0:N-1)*dt;
subplot(121)
plot(t,s,'k')
hold on
stem(t(1:Nr),r,'r')
xlabel('zaman(s)','FontName','TR Arial')
ylabel('Zaman(s)','FontName','TR Arial')
snoise=s+0.01*randn(size(s));
subplot(122)
plot(t,snoise,'k')
hold on
stem(t(1:Nr),r,'r')
xlabel('zaman(s)','FontName','TR Arial')
ylabel('Zaman(s)','FontName','TR Arial')
0 comentarios
Respuesta aceptada
David Hill
el 13 de Oct. de 2022
r=[0 0 0 0 0 0 0 0 0 0 0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0 0 0 0 0 0 0 0 0 0 0 ];
w=[0 0 -0.5 0 1 2 1 0 -0.5 0 0];
s=conv(r,w);
dt=0.001;
Nr=length(r);
Nw=length(w);
N=length(s);
t=(0:N-1)*dt;
subplot(121)
plot(t,s,'k')
hold on
stem(t(1:Nr),r,'r')
xlabel('zaman(s)','FontName','TR Arial')
ylabel('Zaman(s)','FontName','TR Arial')
snoise=s+0.01*randn(size(s));
subplot(122)
plot(t,snoise,'k')
hold on
stem(t(1:Nr),r,'r')
xlabel('zaman(s)','FontName','TR Arial')
ylabel('Zaman(s)','FontName','TR Arial')
view(90,90)
0 comentarios
Más respuestas (1)
Robert U
el 13 de Oct. de 2022
Hi Ebru Ozcan,
have a look at the viewing options of the axes.
clear all; clc; close all;
r=[0 0 0 0 0 0 0 0 0 0 0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0 0 0 0 0 0 0 0 0 0 0 ];
w=[0 0 -0.5 0 1 2 1 0 -0.5 0 0];
s=conv(r,w);
dt=0.001;
Nr=length(r);
Nw=length(w);
N=length(s);
t=(0:N-1)*dt;
sh{1} = subplot(121);
plot(t,s,'k')
hold on
stem(t(1:Nr),r,'r')
xlabel('zaman(s)','FontName','TR Arial')
ylabel('Zaman(s)','FontName','TR Arial')
snoise=s+0.01*randn(size(s));
sh{2} = subplot(122);
plot(t,snoise,'k')
hold on
stem(t(1:Nr),r,'r')
xlabel('zaman(s)','FontName','TR Arial')
ylabel('Zaman(s)','FontName','TR Arial')
sh{1}.CameraUpVector = [-1,0,0];
Kind regards,
Robert
0 comentarios
Ver también
Categorías
Más información sobre Subplots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!