the system is then tested with a sinusoidal input of the form x(t) = sin 4πt using a suitable step size, plot this waveform over the range 0 ≤ t ≤ 1 in matlab

main.m
t = 0:0.001:1;  % defining time vector from 0 to 1 with step size 0.001
x = sin(4*pi*t);  % defining sinusoidal input x(t) = sin(4*pi*t)
plot(t, x);  % plotting the waveform
xlabel('Time (s)');  % x-axis label
ylabel('Amplitude');  % y-axis label
title('Sinusoidal Waveform');  % plot title
291 chars
7 lines

related categories

gistlibby LogSnag