Help with my period of my square wave

Hey Everyone, I dont know how to incorporate the period length into my square wave. I dont think that i have is correct. Any help?
To = str2double(handles.Period)
Wo = (2*pi/To);
N = str2double(handles.Coefs)
Num = str2double(handles.PeriodAmount)
R = (100*str2double(handles.Ratio)) %On/Off Ratio
Snum = Num;
Snum = Snum*2*pi;
q = 0:.001:(Wo);
y = square(Snum*q,R);
plot(q,y);
hold on;
axis([0 Wo -1.5 1.5]);

Answers (1)

Categories

Find more on MATLAB in Help Center and File Exchange

Asked:

on 21 Oct 2016

Edited:

on 25 Nov 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!