Joy of Learning...
Showing posts with label
Square wave
.
Show all posts
Showing posts with label
Square wave
.
Show all posts
Thursday, 3 October 2013
How to generate Square wave, of frequency fm, in Matlab?
How to generate Square wave, of frequency fm, in Matlab?
% let fm = 10Hz
fm = 10;
fs = 1000; %Hz -- sampling frequency
t = 0:(1/fs):1;
squareWave = sign(sin(2*pi*fm*t));
Older Posts
Home
Subscribe to:
Posts (Atom)