How to convert my matlab code into an executable file using Matlab compiler?

20 Ansichten (letzte 30 Tage)
neelove sharma
neelove sharma am 27 Mär. 2019
Beantwortet: Naga am 27 Nov. 2024 um 9:00
I have written a matlab code (.m) which takes input from the user and based on the entered data does few computations and plots data in graphs.
The main functions used in the code are - table, uitable, plot, subplot, input, figure etc.
I have tried using the matlab compiler( without any knowledge on how it works ) and get these errors everytime in log file -
mcc -o Untassaafitled -W WinMain:Untassaafitled -T link:exe -d C:\Users\sharm\Untassaafitled\for_testing -v C:\Users\sharm\Desktop\Untassaafitled.m -r 'C:\Program Files\MATLAB\R2018a\toolbox\compiler\Resources\default_icon.ico'
Compiler version: 6.6 (R2018a)
Dependency analysis by REQUIREMENTS.
[Warning: Executing startup failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should
be resolved as soon as possible. Error detected was:
MATLAB:scriptNotAFunction
Attempt to execute SCRIPT get_param as a function:
C:\Program Files\MATLAB\R2018a\toolbox\simulink\simulink\get_param.m]
[> In matlabrc (line 190)]
[Warning: Your deployed application may error out because file or folder paths
not present in the deployed environment may be included in your MATLAB startup
file. Use the MATLAB function "isdeployed" in your MATLAB startup file to
determine the appropriate execution environment when including file and folder
paths, and recompile your application.
]
Parsing file "C:\Users\sharm\Desktop\Untassaafitled.m"
(Referenced from: "Compiler Command Line").
Deleting 0 temporary MEX authorization files.
Generating file "C:\Users\sharm\Untassaafitled\for_testing\readme.txt".
Packaging...
Creating the bundle...
Web based installer created at C:\Users\sharm\Untassaafitled\for_redistribution\MyAppInstaller_web.exe.
Packaging complete.
Elapsed packaging time was: 30 seconds.
Every help on how to fix these issues is appreciated!

Antworten (1)

Naga
Naga am 27 Nov. 2024 um 9:00
Hello Neelove,
The error may be linked to your 'startup.m' file. Check for recent changes in this file located at $MATLAB/toolbox/local (where $MATLAB is your installation directory).
To identify duplicates, run:
>> which -all startup.m
Rename any incorrect files, then restart MATLAB. If the issue persists, temporarily rename the 'startup.m' file and restart MATLAB to see if the error resolves.

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by