clc;
clear all
close all;
fs=10000;
t=0:1/fs:1;
f=10;
x1=square(2*pi*f*t);
x2=square(2*pi*f/2*t);
x3=square(2*pi*2*f*t);
subplot(3,1,1);
plot(t,x1,'g');
title('original signal');
xlabel('time period');
ylabel('frequency');
subplot(3,1,2);
plot(t,x2,'r');
title('original signal with half frequency');
xlabel('time period');
ylabel('frequency');
subplot(3,1,3);
plot(t,x3,'b');
title('original signal with double frequency');
xlabel('time period');
ylabel('frequency');
clear all
close all;
fs=10000;
t=0:1/fs:1;
f=10;
x1=square(2*pi*f*t);
x2=square(2*pi*f/2*t);
x3=square(2*pi*2*f*t);
subplot(3,1,1);
plot(t,x1,'g');
title('original signal');
xlabel('time period');
ylabel('frequency');
subplot(3,1,2);
plot(t,x2,'r');
title('original signal with half frequency');
xlabel('time period');
ylabel('frequency');
subplot(3,1,3);
plot(t,x3,'b');
title('original signal with double frequency');
xlabel('time period');
ylabel('frequency');
0 comments:
Post a Comment