Saturday 12 December 2015

How to Creating an arbitrary periodic signal in square wave form?


If you have synthesized a signal using any of the methods described above you can use that signal as
the repeating segment in a periodic signal. This particularly useful for signals that cannot be described mathematically without the use of piece wise functions

Square waveform:


clear all;
close all;
repeating_segment = [ zeros(1, 100) ones(1, 100)];
num_periods = 10;
square_waveform = []; % empty variable
for k = 1 : num_periods
square_waveform = [square_waveform repeating_segment];
end
plot(square_waveform);
ylim([-0.1 1.1])



FOR MORE DETAILS CLICK HERE




No comments:

Post a Comment