matlab - How to know sampling frequncy of a sin(x) function -


consider following script plots sine wave.

t = 0:pi/100:2*pi; y = sin(t); plot(t,y) grid on % turn on grid lines plot 

this gives me plot of sine wave. understand sine wave appears continuous, should discrete (my pc cannot store infinite no. of samples of continous signal), , matlab plot function kind of interpolation connect dots. in fact used stem instead of plot see sampled values (on time axis) of sine.

now question there must sampling frequency used here. how that? hint appreciated.

the sampling interval time interval between 2 consecutive samples of signal.

the sampling frequency means how samples of signal have in fixed time interval, , reciprocal sampling interval.

you declared:

t = 0:pi/100:2*pi; 

so sampling interval π/100. means sampling frequency 100/π.

if want exact units, you'll have determine time units t. if t in seconds, sampling frequency 100/π hz (1hz = 1sec-1).

by way, matlab's plot connects sampling straight lines, there no additional interpolation involved.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -