clear all close all clc b = 3; a = 3; t = -10:0.1:10; % segnale s = tanh(t); figure(1) plot(t,s,'-b') grid xlabel('tempo t [s]') ylabel('segnale s(t)=tanh(t)') title('Plot di una tangente iperbolica') % segnali traslati x1 = tanh(t-3); x2 = tanh(t+3); figure(2) plot(t,s,'-b') grid xlabel('tempo t [s]') hold on plot(t,x1,'-r',t,x2,'-g') hold off legend('segnale','traslazione dx','traslazione sx') % segnali scalati y1 = tanh(t/a); y2 = tanh(a*t); figure(3) plot(t,s,'-b') grid xlabel('tempo t [s]') hold on plot(t,y1,'--r') plot(t,y2,'-.g') hold off legend('segnale','scala (espanso)','scala (compattato)')