The above options are only available if you have "Simulink Coder" (and optionally "Embedded Coder") installed and licensed for. Please try out the following troubleshooting steps:
1. Try restarting:
Restarting MATLAB and/or your PC may resolve the issue, especially if a MathWorks related product was recently installed or updated.
2. Check if the Code Generation option is present for a shipped model:
Check for the Code Generation option in Model Configuration Parameters (CTRL+E) .
If the code generation options are available for the shipped model:
a. Check if the model without the options has any issues in the Upgrade Advisor.
b. Try to re-create the model in a fresh file by copying and pasting all blocks.
If the code generation options are available for the shipped model and the issue persists after the above checks, contact MathWorks Technical Support . If the code generation options are not available for the shipped model, please see below.
3. Check Licensing:
>> [status,errmsg] = license('checkout','Real-Time_Workshop')
>> [status1,errmsg1] = license('checkout','RTW_Embedded_Coder')
Check that status = 1 and errmsg = 0×0 empty char array.
Check that the license for Simulink Coder is listed, i.e. "real-time_workshop", and "rtw_embedded_coder" for Embedded Coder if applicable.
4. Check Installation:
Check that "Simulink Coder" is listed (additionally "Embedded Coder" if applicable).
If the product has a license, but is missing from the above, then add "Simulink Coder" (and "Embedded Coder" if applicable) toolbox to your existing installation as shown in the following link:
5. Check MATLAB path and cache:
>> restoredefaultpath
>> rehash toolboxcache
>> sl_refresh_customizations
If the issue is resolved by the above steps, then you may optionally take an additional step to ensure it does not reappear:
Note: The first command to restore the default path will remove any custom paths you may have created for the remainder of the current MATLAB session. (This may break the installation of e.g. Optional Feature or Support Package Add-Ons.) The command above to save the path will make this change persist to new sessions. If you would like help backing up custom additions to your path please refer to the following link:
When contacting MathWorks Technical Support, please include the outcome of the above checks and your license information.
Best Answer