[SIMULINK] Increment a variable

조회 수: 8 (최근 30일)
Jay Samin
Jay Samin 2016년 8월 26일
댓글: Jay Samin 2016년 8월 26일
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

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 8월 26일
  댓글 수: 1
Jay Samin
Jay Samin 2016년 8월 26일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by