Variable name not coming properly in the generated code
3 ビュー (過去 30 日間)
古いコメントを表示
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
2012 年 3 月 6 日
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. =)
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!