Commit b57a6a4b authored by 代育津's avatar 代育津
Browse files

update

parent 44935a25
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -4,28 +4,25 @@ x2=5*[zeros(1,5) 1 zeros(1,5)];
y1=sin((pi/2)*x1);
y2=sin((pi/2)*x2);

subplot(4,1,1);
subplot(3,1,1);
stem(n,x1);
title('1.4 (d)-1');
xlabel('n');
ylabel('x_1[n]');

subplot(4,1,2);
subplot(3,1,2);
stem(n,x2);
title('1.4 (d)-2');
xlabel('n');
ylabel('x_2[n]');

subplot(4,1,3);
stem(n,y1,'m--s');
title('1.4 (d)-3');
xlabel('n');
ylabel('(sin(\pi/2) x_1[n])');

subplot(4,1,4);
subplot(3,1,3);
stem(n,y1,'b--s');
hold on;
stem(n,y2,'r--h');
title('1.4(d)-4');
legend('(sin(\pi/2) x_1[n])','(sin(\pi/2) x_2[n])');
title('1.4 (d)-3');
xlabel('n');
ylabel('(sin(\pi/2) x_2[n])');
ylabel('y[n]');

saveas(gcf, "LAB1/P1_4_d_out.png")
 No newline at end of file
+4 −8
Original line number Diff line number Diff line
@@ -7,14 +7,10 @@ y1=diffeqn(a,x,yn1);
yn1=0.5;
y2=diffeqn(a,x,yn1);

subplot(2,1,1);
stem(n,y1,'r--p');
title('1.5(d)-1');
xlabel('y[-1]=0');

subplot(2,1,2);
stem(n,y2,'m--s');
title('1.5(d)-2');
xlabel('y[-1]=0.5');
hold on;
stem(n,y2,'b--s');
legend('y[-1]=0','y[-1]=0.5');
title('1.5(d)');

saveas(gcf, "LAB1/P1_5_d_out.png")
 No newline at end of file