for in MATLAB Function block in Simulink

2 次查看(过去 30 天)
Facing trouble in implementing our algorithm in Simulink which contains for loop. For loop in MATLAB Function is not running properly.
We have MATLAB code which contains for loops. For loops ain't implemented in Simulink by us.
Please help us.
Waiting for reply.

采纳的回答

Andrey Kiselnikov
Andrey Kiselnikov 2019-7-22
编辑:Andrey Kiselnikov 2019-7-22
There are two right ways to solve you problem:
  1. Refactor your code with replacing loops with matrix operations https://www.mathworks.com/matlabcentral/answers/369868-how-do-i-replace-my-for-loops-using-matrix-manipulation
  2. Build your algorithms with Stateflow
  5 个评论
Maitreyee Mordekar
Maitreyee Mordekar 2019-7-24
Hello Hemant,
That's great to hear!
All the best,
Maitreyee
Andrey Kiselnikov
Andrey Kiselnikov 2019-7-24
If it was helpful you can mark answer as accepted ;)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Parrot Minidrones 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by