- Set Iteration limit to 9 (for iterating 1 to 9)
- Add inport to iterator Subsystem as b
- Add outports to iterator Subsystem as c & d (I assume c & d are outputs)
- Implement your logic
How to apply 'For Iterator" in simulink?
2 ビュー (過去 30 日間)
古いコメントを表示
Recently I've been trying to simulate a model in simulink. I wanted to run the system using For Iterator, I try to express it using code.
int local_time;
for(local_time=9; local_time<=17; local_time=local_time+1)
{
a=local_time+b; //One equation using local_time as input
sin c=(cos a)*(cos b);//another 2 equation need a as input
cos d=(sin a)*(cos C);//the equation will calculate using different
//local_time from 9 to 17
}
Can it be done using Simulink 'For Iterator'? And do I need to put my equation block inside the 'For Iterator' block?
0 件のコメント
回答 (1 件)
TAB
2018 年 7 月 17 日
Use For Iterator Subsystem SubSystem:
4 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!