MATLAB: How to ensure that the generated code has C99 data types as opposed to built-in C data types during fixed point code generation

matlab coder

How can I ensure that the generated code has C99 data types as opposed to built-in C data types during fixed point code generation? 

Best Answer

You will have to change the MATLAB Coder settings to obtain the C99 types as opposed to built-in C types in the generated code.
This can be done as follows: 
1. While using the MATLAB coder UI, in the 'Generate Code' section - where the language and build type is selected, click on 'More Settings'.
2. Under the  'All Settings' pane , under Code appearance -> Code Style, there is an option to set the 'Data Type Replacement'.
3. From the drop down menu, select   'Use MathWorks typedefs in generated code'.  
4. Now the generated code will have the C99 types.
More information regarding this process along with the command line approach is available at: