Академический Документы
Профессиональный Документы
Культура Документы
% to plot sawtooth signal clear all close all t=-0.5:0.01:0.5; y=sawtooth(20*t) plot(t,y) xlabel('time') ylabel('amp') title('sawtooth signal')
% to plot ramp signal clear all close all t=-0.5:0.01:0.5; y=t plot(t,y) xlabel('time') ylabel('amp') title('ramp signal')
% to plot triangular signal clear all close all t=-0.5:0.01:0.5; y=rectplus(t*y) plot(t,y) xlabel('time') ylabel('amp') title('triangular signal')
% to plot sinc signal clear all close all t=-0.5:0.01:0.5; y=sinc(t/y) plot(t,y) xlabel('time') ylabel('amp')
title('sinc signal')
% to plot square signal clear all close all t=-0.5:0.01:0.5; y=square(t) plot(t,y) xlabel('time') ylabel('amp') title('square signal')
% to plot signum signal clear all close all t=-0.5:0.01:0.5; y=sign(t) plot(t,y) xlabel('time') ylabel('amp') title('sign signal')
% to plot unit step signal clear all close all y=one(100,1) plot(y) xlabel('time') ylabel('amp') title('unit step signal')
% to plot unit impulse signal clear all close all y=[1;zeros(999,1)]; plot(y) xlabel('time') ylabel('amp') title('unit impulse signal')