square wave with different duty cycle???
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
i want to draw square wave with different duty cycle???
thank you for your consideration.....
0 Commenti
Risposte (1)
KALYAN ACHARJYA
il 24 Set 2019
Modificato: KALYAN ACHARJYA
il 24 Set 2019
t=linspace(0,3*pi)';
duty_cycle=60; % Percentage
x = square(t,duty_cycle);
plot(t/pi,x)
grid on
Documentation here
More plots
for i=1:10
t=linspace(0,3*pi)';
duty_cycle=randi(100); % Percentage
x = square(t,duty_cycle);
plot(t/pi,x,'*-');
hold on;
end
grid on;
2 Commenti
Walter Roberson
il 1 Ott 2019
Create a segment with one duty cycle, create a segment with a different duty cycle, concatenate the two with with the [] list operator.
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!