statement in test assessment block

3 ビュー (過去 30 日間)
Pratik
Pratik 2024 年 6 月 18 日
回答済み: Pratik 2024 年 6 月 18 日
how can i verify output (multiple statements)w.r.t time in test assessment block , for example-(if t==1 ,verify (out== 1 ) ) (if t==2,verify (out== 2) )........(if t==8 ,verify (out== 8 ) ) can we use any loops in test assement block in simulink test ?
for t=1:8
if t==i
verify(out==i)
end
this for loop showing error.

採用された回答

Anurag Ojha
Anurag Ojha 2024 年 6 月 18 日
編集済み: Anurag Ojha 2024 年 6 月 18 日
Hi Pratik
In Simulink Test, you can verify outputs at different time steps using the Test Assessment block by employing a series of "if" statements. However, Simulink Test does not support traditional for-loops directly within the Test Assessment block.
To understand how to verify multilple conditions at a time you can refer to following MATLAB documentation:

その他の回答 (1 件)

Pratik
Pratik 2024 年 6 月 18 日
thanks Anurag, so i need to write a seperate verify statement at multiple time step? is there any another way to implement whole thing as i mentioned ?

カテゴリ

Help Center および File ExchangeInputs についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by