x(t) = sin 4πt (3) using a suitable step size, plot this waveform over the range 0 ≤ t ≤ 1 in matlab

main.m
t = 0:0.001:1;  % Define t from 0 to 1 with step size of 0.001
x = sin(4 * pi * t) * 3;  % Calculate x(t) = sin(4πt) * 3

plot(t, x);  % Plot the waveform
xlabel('Time');
ylabel('Amplitude');
title('x(t) = 3*sin(4πt) waveform');
229 chars
8 lines

related categories

gistlibby LogSnag