change the input data, by application compiler

hello
I would like to know if it's possible after creating the executable file by application compiler, to change the input data, i.e. input data in the form of Excel file, and run the code with other new data ?
Thank you

5 个评论

Short answer yes it can be done. You will need to prompt the user to select the file. Use the function uigetfile to prompt the user to select the file.
https://www.mathworks.com/help/matlab/ref/uigetfile.html
thanks Mohamed I will try it
I tested this function it works very well when you do normal run. But the problem when I create an executable file by compiler , and when I run the application, it cannot find the data in the Excel file despite running normally it found !!
Do you have any idea?
thanks you
Error using xlsread (line 139)
XLSREAD unable to open file 'data_example_curvefit1.xls'.
File 'C:\Users\SWY\Documents\Projet_ DATAFAB\Code_DOE_novmbre\exemple_lsqcurvefit\for_redistribution_files_only\data_example_curvefit1.xls' not found.
Error in exemple_lsqcurvefit (line 16)
MATLAB:xlsread:FileNotFound
Is the file path in error message correct location of the file?.
Try the following way to get full path to the file selected.
[file,path] = uigetfile();
fullpath = fullfile(path,file);
Hello Mohammed
it is working now ,
thank you very much

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by