How to sum array elements in a for loop in Stateflow C action language

조회 수: 10 (최근 30일)
Smith J
Smith J 2016년 9월 7일
편집: Smith J 2016년 9월 7일
I tried everything I could think of, it seems the Stateflow C action language does not recognize "for" loop, the only way I can make it work is :
entry: sum = a[0] + a[1] + a[2] + a[3];
avg = sum / count;
But what if I don't know count ahead of time, what do I do ?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Decision Logic에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by