How to get the iterator count of while iterator

Hello Guys,
can someone help me to find the iteration count of while iterator block after a step time
i tried to access the runtimeobject to get the iterator count.it is possible to get the iteration count only when the show iteration count number is checked(dialog parameter)
if it is not checked how to access the ieteration count?
Thanks in advance

8 件のコメント

KSSV
KSSV 2020 年 6 月 8 日
count = 0 ;
while condition
count = count+1 ;
end
Walter Roberson
Walter Roberson 2020 年 6 月 8 日
KSSV: the question is about Simulink blocks.
KSSV
KSSV 2020 年 6 月 8 日
I was skeptic...thats why I commented... :)
Ajay krishna Vasanthakumar
Ajay krishna Vasanthakumar 2020 年 6 月 8 日
do we have a solution walter ?.i am thinking about it for very ling time :)
Walter Roberson
Walter Roberson 2020 年 6 月 8 日
I poked around for a while, but the only place I can find it holding the iteration count is in the output port, and that output port does not exist if the iteration count port block parameter is not set.
Ajay krishna Vasanthakumar
Ajay krishna Vasanthakumar 2020 年 6 月 9 日
Thanks for your response Walter :)
Walter Roberson
Walter Roberson 2020 年 6 月 9 日
I looked at every field and hidden field of the appropriate data structures that I could find; the output port was the only place I could find the iteration count.
Ajay krishna Vasanthakumar
Ajay krishna Vasanthakumar 2020 年 6 月 10 日
Thanks a lot walter

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEvent Functions についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by