How to read .ini file dynamically during runtime using standalone application created using Matlab Compiler
Mostra commenti meno recenti
I have a GUI created in Matlab, and it reads an .ini file to obtain the initial parameter settings to the GUI. The .ini file is treated as a normal text file and its contents are read via functions like fopen(), fgets(), fclose(). This worked fine when executed in Matlab.
My question would be, how do I also enable this after compiling my GUI into a standalone application using Matlab Compiler? I would like my .ini file to be included as an external file to my main (.m file).
Thanks in advance!
Risposta accettata
Più risposte (1)
David Sanchez
il 12 Ago 2013
You can use the uigetfile function within your GUI main *.m file.
[FileName,PathName] = uigetfile('*.ini','Select the INITIALIZATION file');
ini_path = fullfile(PathName, FileName);
The *.ini file will become user selectable.
For all the details:
doc uigetfile
1 Commento
Chong
il 13 Ago 2013
Categorie
Scopri di più su App Building in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!