Commit fcf77683 authored by Morten Liland's avatar Morten Liland
Browse files

comented matlab code

parent f093b2eb
function signal = generate_squarewave(f, Fs, t)
time = 0:1/Fs:t - 1/Fs;
wave = zeros(1,length(time));
%% generate_squarewave generates square wave from the input.
%
% f - freq
% Fs - Sampling rate
% t - The length of the signal.
time = 0:1/Fs:t - 1/Fs; % vector that holds equally spaced time interval
wave = zeros(1,length(time)); % initialize the wave data vector.
sample_period = 1/Fs;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment