clear all
clc
N=200;
n=1:N;
s1=2*sin(0.2*pi*n);
s2=square(0.2*pi*n,50);
s3=sawtooth(0.1*pi*n);
s4=rand(1,N);
s=[s1;s2;s3;s4];
W=rand(4);
X=W*s;
figure(1)
subplot(4,1,1);
plot(s1);
axis([0 N -5 5]);
title('源信号');
subplot(4,1,2);
plot(s2);
axis([0 N -5 5]);
subplot(4,1,3);
plot(s3);
axis([0 N -5 5]);
subplot(4,1,4);
plot(s4);
axis([0 N -5 5]);
Xlable('Time');
figure(2);
subplot(1,4,1);
plot(X(1,:));
axis([0 N -5 5]);
subplot(1,4,2);
plot(X(2,:));
axis([0 N -5 5]);
subplot(1,4,3);
plot(X(3,:));
axis([0 N -5 5]);
subplot(1,4,4);
plot(X(4,:));
axis([0 N -5 5]);