Program 1
clear all;
x1=[0:0.2:1];
x2=[-1:0.2:0];
stg1=trimf(x1,[-1 0 1])
stg2=trimf(x2,[-1 0 1])
subplot(311)
plot(x1,stg1,'b',x2,stg2,'b','linewidth',4)
%axis([-1.1 1.1 0 1.1])
subplot(312)
plot(x1,stg1,'r',x2,stg2,'r','linewidth',4)
%axis([-1.1 1.1 0 1.1])
subplot(313)
stg3=(conv(stg1,stg2))
plot(stg3,'g','linewidth',4)
%axis([1 11 0 3])
Tidak ada komentar:
Posting Komentar