[SIMULINK] Increment a variable

8 vues (au cours des 30 derniers jours)
Jay Samin
Jay Samin le 26 Août 2016
Commenté : Jay Samin le 26 Août 2016
Hi everyone,
I have a problem in Simulink, I have a variable "k" as constant Block (start Value k =1 ) and i would like to increment "k" after every Time i simulate my Modell untill k=4 then should k reset to 1
i will apreciate any Help many thanks Jay

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 26 Août 2016
  1 commentaire
Jay Samin
Jay Samin le 26 Août 2016
Hallo Azzi,
thank you for the quick response,after runing ur model I get "y" as a vector [1 2 3 4, 1 2 3 4 ect] in workspace .
but actually i wanted to increment "y" by 1 after each time I click on "the simulation button" untill "y" is 4 then it will be reset to 1 again. Jay

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by