Info
この質問は閉じられています。 編集または回答するには再度開いてください。
how to model a function where only one bus element is operated(rest elements are not updated)
1 回表示 (過去 30 日間)
古いコメントを表示
Hi All,
In My function we are having a global array of objects(Type structure). in for loop we are performing operation on single element of bus,rest of the elements are used in other function we have modelled the logic,The issue we are facing is we have grounded all other members in the model,which makes all elements of object assign to zero.(which we dont want) -> how can we use one bus element in a model.
- define W_MAX 4typedef struct { S16 Vel_Err[W_MAX]; S16 Vel_Rng[W_MAX]; } TC_EN_CL_OBJECT;
TC_EN_CL_OBJECT Tc_En_C[W_MAX];
for (i = 0; i < W_MAX; i++) { if ( (Tc_Whl[i].Vel ==20 ) ) { Tc_En_C[W_MAX].Vel_Rng[i] =10; } else { } } Note: we have tried with bus selector,but other elements are grounded.(which we dont want)
Regards, Sai
0 件のコメント
回答 (0 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!