Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a standalone application from a MATLAB function.
MATLAB
mcc -m [1].mAttempts:
3 left
💡 Hint
Common Mistakes
Including the '.m' extension in the filename after '-m'.
Using a function name that does not exist.
✗ Incorrect
The command 'mcc -m myApp.m' compiles the MATLAB function 'myApp.m' into a standalone application.
2fill in blank
mediumComplete the code to specify the output folder for the standalone application.
MATLAB
mcc -m [1].m -d outputFolderAttempts:
3 left
💡 Hint
Common Mistakes
Using an incorrect function name.
Placing the output folder name in the wrong position.
✗ Incorrect
The command compiles 'myApp.m' and places the output files in the folder named 'outputFolder'.
3fill in blank
hardFix the error in the command to include additional files in the standalone application.
MATLAB
mcc -m myApp.m [1] extraFile.txtAttempts:
3 left
💡 Hint
Common Mistakes
Using '-d' which specifies output directory.
Using '-o' which names the output executable.
Using '-p' which specifies a toolbox path.
✗ Incorrect
The '-a' option adds extra files like data or text files to the standalone application.
4fill in blank
hardFill both blanks to specify the output executable name and include a required toolbox path.
MATLAB
mcc -m myApp.m -o [1] [2] /toolbox/signal
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing '-a' with '-p' for adding toolbox paths.
Not specifying the executable name after '-o'.
✗ Incorrect
The '-o' option sets the executable name, and '-p' adds the toolbox path needed for compilation.
5fill in blank
hardFill all three blanks to create a standalone application with a custom executable name, add extra files, and specify the output directory.
MATLAB
mcc -m [1].m -o [2] [3] dataFile.dat -d buildOutput
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of options.
Forgetting to add the '-a' option for extra files.
Using wrong names for the executable or function.
✗ Incorrect
The command compiles 'mainApp.m' with executable named 'myExecutable', adds 'dataFile.dat' with '-a', and outputs to 'buildOutput' folder.
