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 Comments

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

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Asked:

on 3 Dec 2020

Commented:

on 4 Dec 2020

Community Treasure Hunt

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

Start Hunting!