필터 지우기
필터 지우기

Comparing if statement performance

조회 수: 1 (최근 30일)
Luhur
Luhur 2011년 6월 16일
hi all,,
i just wanna ask, what if we have a lot of if statement in our algorithm, let say 100-500 line,, which one more faster if we make it the condition, is it with:
1. Simulink (Matlab Function block) 2. Simulink (if action subsystem) 3. stateflow
or any suggestion???

채택된 답변

Arnaud Miege
Arnaud Miege 2011년 6월 16일
I would suggest either a MATLAB Function block or Stateflow. Simulink and if action susbsytems are OK for relatively simple logic algorithms, but for that sort of size, it will become cumbersome very quickly. Whether MATLAB Function or Stateflow is a personal preference: whether you prefer to express your algorithm graphically (and animate it during simulation for debugging purposes), or textually. Both use the same technology and so should give the same performance.
HTH,
Arnaud
  댓글 수: 1
Luhur
Luhur 2011년 6월 16일
thanks Arnaud!! :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by