Set Up aMATLABCoderProject
To open the app, on the MATLAB®ToolstripAppstab, underCode Generation, click theMATLAB Coder™app icon.
Create a project or open an existing project. SeeCreate a ProjectandOpen an Existing Project.
If the app detects code generation readiness issues in your entry-point functions, address these issues.
Define the properties of the entry-point function input types. SeeSpecify Properties of Entry-Point Function Inputs Using the App.
Check for run-time issues. Provide code or a test file that the app can use to test your code. The app generates a MEX function. It runs your test code or test file, replacing calls to your MATLAB function with calls to the MEX function. This step is optional. However, it is a best practice to perform this step. You can detect and fix run-time errors that are harder to diagnose in the generated C code.
Configure the build settings. Select the build type, language, and production hardware. Optionally, modify other build settings. SeeConfigure Build Settings.
You can now generate code.
Create a Project
On theSelect Source Filespage, specify the MATLAB files from which you want to generate code. An entry-point function is a function that you call from MATLAB. Do not add files that have spaces in their names.
The app creates a project that has the name of the first entry-point function.
Open an Existing Project
On the app toolbar, clickand select打开现有的项目.
Type or select the project.
The app closes other open projects.
TheMATLAB Coderapp is not supported inMATLAB Online™.
If the project is a Fixed-Point Converter project, and you have a Fixed-Point Designer™ license, the project opens in the Fixed-Point Converter app.