Variable name not coming properly in the generated code
5 次查看(过去 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!