 <pre><code>f1 = 1 ; N = 1024 ; fs = 200 ; ts = 1/fs ; t = -(N/(2*fs)):ts:(N/(2*fs) ; y = sin(2*pi*f1*t) ; plot(t,y) </code></pre> <p>You do not need to use i for getting 1024 samples out. this can be done by choosing correct start and stop values for t.</p>