Triangle, sawtooth plot

22 vues (au cours des 30 derniers jours)
Ruslanas Kryzanauskas
Ruslanas Kryzanauskas le 11 Déc 2022
Hello, how to write these formulas in screenshot for plotting. As I understand I have to get triangle and sawtooth wave plots, but i am not getting that: The code I use:
f = 1
t=0:0.01:5;
y = 4|F*t-[floor(F*t+1/2)]|-1;
plot(t,y)
f = 0.2
t=0:0.01:5;
y = 2*((F*t))%1/2))f-1;
plot(t,y)

Réponse acceptée

VBBV
VBBV le 11 Déc 2022
f = 1
f = 1
t=0:0.01:5;
y = 4*abs(f*t-[floor(f*t+1/2)])-1;
plot(t,y)
f = 0.2
f = 0.2000
t= 0:0.01:5;
y = 2*(mod((f*t),1/2))*f - 1;
plot(t,y,'linewidth',2);
  1 commentaire
Ruslanas Kryzanauskas
Ruslanas Kryzanauskas le 11 Déc 2022
cheers mate!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by