Help with my period of my square wave

3 vues (au cours des 30 derniers jours)
Jesse Abruzzo
Jesse Abruzzo le 21 Oct 2016
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]);

Réponses (1)

Image Analyst
Image Analyst le 25 Nov 2016
Maybe try using repmat() instead.

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by