MATLAB Answers

0

for in MATLAB Function block in Simulink

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.

  댓글 수: 0

로그인 to comment.

답변 수: 1

Andrey Kiselnikov 님이 편집함. 22 Jul 2019
 채택된 답변

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

표시 이전 댓글 수: 2
Thanks Andrew Sir and Maitreyee Ma'am
Our model is good to go.
Hello Hemant,
That's great to hear!
All the best,
Maitreyee
If it was helpful you can mark answer as accepted ;)

로그인 to comment.



Translated by