MATLAB: How to plot signal for equation given below

plot

Equations are 1) Sin^2(wt)/t 2) sin(at)sinh(at)/2(a^2) 3) ((e^-t)+(e^-3t))u(t)

Best Answer

  • Try this
    t = linspace(0, 10, 100);
    w = 1;
    a = 1;
    y1 = sin(w*t)./t;
    y2 = sin(a*t).*sinh(a*t)./(2*a^2);
    y3 = (exp(-t)+exp(-3*t)).*heaviside(t);
    subplot(3,1,1)
    plot(t, y1)
    subplot(3,1,2)
    plot(t, y2)
    subplot(3,1,3)
    plot(t, y3)