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 件のコメント

Mohammad Sami
Mohammad Sami 2020 年 12 月 3 日
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 2020 年 12 月 3 日
thanks Mohamed I will try it
yousef swesi
yousef swesi 2020 年 12 月 3 日
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 2020 年 12 月 4 日
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 2020 年 12 月 4 日
Hello Mohammed
it is working now ,
thank you very much

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB Compiler についてさらに検索

質問済み:

2020 年 12 月 3 日

コメント済み:

2020 年 12 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by