Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Looping for many data
1 回表示 (過去 30 日間)
古いコメントを表示
Hi all,
What is the best Simulink modeling for below C code segment. I tried For Iteration Subsystem, and looking for better ways fits to Simulink-thinking.
typedef struct {
int min, max;
int *value;
} Condition;
bool isInRange(Condition *cond) {
return *value > min and *value < max;
}
int main() {
Condition cond[10000] = {{1,2,ptr1}, {10,20,ptr2}, .......};
for(int i = 0; i < 10000; i++) {
if(isInRange(cond+i)) {
// do something
}
}
}
0 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!