for in MATLAB Function block in Simulink

조회 수: 2 (최근 30일)
HEMANT GHUGE
HEMANT GHUGE 2019년 7월 22일
댓글: Andrey Kiselnikov 2019년 7월 24일
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에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by