- Open the model in MATLAB.
- In the MATLAB command window, type coder.mapping.api.get(model) to get the current code mappings for the model.
- Identify the code mappings that you want to remove and note their names.
- Type coder.mapping.api.remove(model, 'mapping_name') for each code mapping that you want to remove, replacing 'mapping_name' with the name of the code mapping you want to remove.
- Save the model.
How do I remove a code mapping from a model?
10 views (last 30 days)
Show older comments
I used the code mapping editor and api to add code mappings to several models. This appears to have caused issues with other members of the team that do not have the embeded coder toolbox (see this question). I would like to set it up where I configure the code mappings later, as part of the code generation process, instead of just having it on all the time. But I cannot figure out how to remove code mappings from a model that has them. Nothing in the GUI shows how to do it, and the code.mapping command line path has no remove functions.
0 Comments
Answers (1)
Rishav
on 3 May 2023
Hi Scott,
To remove code mappings from a model, you can follow these steps:
This should remove the code mappings from the model. You can then configure the code mappings later, as part of the code generation process, by using the code mapping editor and API.
You can also refer to this documentation to know about more such functions related to code mapping: Model data and function interface configuration for C code generation - MATLAB (mathworks.com)
Regards,
Rishav Saha
See Also
Categories
Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!