how to make a vertical plot?
9 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
David Hill
2022 年 10 月 13 日
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 件のコメント
その他の回答 (1 件)
Robert U
2022 年 10 月 13 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!