Help with my period of my square wave
Show older comments
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)
Image Analyst
on 25 Nov 2016
0 votes
Maybe try using repmat() instead.
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!