How do you generate a stair up MATLAB function?

3 vues (au cours des 30 derniers jours)
Ahmed Aldulaim
Ahmed Aldulaim le 30 Jan 2019
Commenté : Star Strider le 30 Jan 2019
How do you generate a stair up MATLAB function?
exactly like the one in the pircture below

Réponse acceptée

Star Strider
Star Strider le 30 Jan 2019
Try this:
t = 0:100;
s = floor(rem(t, 10.1));
figure
stairs(t, s)
Experiment to get the result you want.
  6 commentaires
Ahmed Aldulaim
Ahmed Aldulaim le 30 Jan 2019
Thank you sir! It helped.
Star Strider
Star Strider le 30 Jan 2019
As always, my pleasure!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by