sine wave in matlab

Thread Starter

Ron Potashnik

Joined Dec 27, 2015
16
hello.
i wrote this code in matlab

t=[0:0.2e-3:3e-3];
f=2*pi;
v=sin(f*t*1000);
plot(t,v)

and my sine plot is looking like this
matlab.png

why dosent it look like a normal sine wave
 

WBahn

Joined Mar 31, 2012
26,303
Good.

A good rule of thumb is that you need at least about ten samples per cycle for it to look halfway decent for humans -- more is better. But, from a sampling theorem and information theory standpoint you can get by with less.
 
Top