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!