MATLAB: How to draw 4hz sine wave

sinewave

Can anyone help me how to modify the following code to draw 4hz sine wave.
A=input('Enter the value of amplitude=');
f=input('Enter the value of frequency=');
T=1/f;
t=0:T/99:2*T;
yy=A*sin(2*pi*f*t);
subplot(2,1,1);
plot(t,yy);

Best Answer

Replace the two input() statements with plain assignments. 4 Hz would be assigning 4 to f.