Filter löschen
Filter löschen

modify the function addpath

2 Ansichten (letzte 30 Tage)
pink
pink am 1 Jul. 2011
how to modify the function addpath (), if before the compiled function can work, but once compiled addpath function () can not work
my code 1
addpath(fullfile(pwd,'namefoldel'))
inputdata % gui_files
my code 2
addpath(pwd,'namefolder')
[x,y]=function1(a,b) % function_file
[c,d]=function2(x,y) % function_file
my code 3
addpath(pwd,'namefolder')
addpath(fullfile(pwd,'namefoldel'))
system('nameexecutable.exe') % executable_file

Akzeptierte Antwort

Friedrich
Friedrich am 1 Jul. 2011
Since the MATLAB Compiler adds the functions1 and function2 to the ctf achieve with the folder structure like in MATLAB you don’t need an addpath in the deployed application. This is because in the deployed application the added folders are automatically added to the MATLAB path.
If your GUI files are normal m-files you don’t need an addpath. When you have created the GUI through using GUIDE you have to add the .fig as shared resources.
  6 Kommentare
pink
pink am 1 Jul. 2011
whether such?
if ~isdeployed
addpath(pwd,'namefolder')
inputdata %gui file
else
inputdata %gui file
end
pink
pink am 1 Jul. 2011
whether such?
if ~isdeployed
addpath(pwd,'namefolder')
inputdata %gui file
else
inputdata %gui file
end

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by