- Signal storage reuse
- Eliminate superfluous variables (expression folding)
- Enable local block outputs
- Reuse global/local block outputs
I don't want to use local variable in chart
1 view (last 30 days)
Show older comments
Hi, I am Student in graduated school.
I have some problem about code generation of chart.
when I generate code condition, [AAA > (BBB>>1)]
It generate code like this.
Local_tmp = BBB >> 1;
if(AAA > Local_tmp) {...}
to conclude, I don't want to make local variable in code. So, Isn't there any to set variable's data type?
0 Comments
Accepted Answer
Jonas
on 4 Jun 2019
You need to check your 'Configuration Parameters', under the section 'Code Generation' part 'Optimization'. For your requirements, I believe you will need to check:
Depending on what you require, you may want to try these settings some more.
More Answers (0)
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!