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 comentarios

Mohammad Sami
Mohammad Sami el 3 de Dic. de 2020
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
yousef swesi
yousef swesi el 3 de Dic. de 2020
thanks Mohamed I will try it
yousef swesi
yousef swesi el 3 de Dic. de 2020
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
Mohammad Sami
Mohammad Sami el 4 de Dic. de 2020
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);
yousef swesi
yousef swesi el 4 de Dic. de 2020
Hello Mohammed
it is working now ,
thank you very much

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB Compiler en Centro de ayuda y File Exchange.

Preguntada:

el 3 de Dic. de 2020

Comentada:

el 4 de Dic. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by