Variable name not coming properly in the generated code

Hi,
I have generated code from the simulink model(2011b matlab )
My simulink model contains embedded matlab function where i have some algorithm implemented which is using some of the local variables defined
For e.g abc = single(0.0)
so in the generated code it is coming as real32_T abc;
This is okay
but when i am changing the varaiable name say
abc_f32 = single(0.0)
it is coming as real32_T abc_f;
not correct
when i am changing to abc_f32f = single(0.0)
it is coming as real32_T abc_f32f;
Why this strange behaviour any idea????
Please help me to solve this problem??
Please Suggest me any solution.

답변 (1개)

Geoff
Geoff 2012년 3월 6일

0 개 추천

Does it happen when you have other numeric suffices on your variable names? ie if you have the variable 'abc_f31' or 'abc_f33'?
If other suffices work but 32 does not, then I would say they have explicitly prevented that value to avoid name clashes.
The suggested solution, of course, is to not use variable names that end with numbers. =)

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

질문:

2012년 2월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by