フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to model a function where only one bus element is operated(rest elements are not updated)

1 回表示 (過去 30 日間)
Sai Neelam
Sai Neelam 2018 年 7 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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.
  1. 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 件)

この質問は閉じられています。

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by