Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
Sai Neelam
Sai Neelam le 8 Juil 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
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

Réponses (0)

Cette question est clôturée.

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by