Variable name not coming properly in the generated code
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
Respuestas (1)
Geoff
el 6 de Mzo. de 2012
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 comentarios
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!