How to create an exe file from Matlab .m file which obtains real time data input from an excel file and plot a graph accordingly?
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Tjunkit Liew
il 10 Lug 2018
Commentato: Tjunkit Liew
il 10 Lug 2018
Currently I'm trying to develop an exe file from Matlab .m file. I'm planning to push a real time data input from my controller into an excel file, and read the excel file using Matlab and plot a graph.
However, when I created the exe file, the graph wouldn't change as real time data input from excel. It would always remain the data from excel when the application file was created.
How can I solve this as to plot the graph as the real time data input accordingly?
Thank you in advance.
0 Commenti
Risposta accettata
Sri Harish G
il 10 Lug 2018
You might be facing this problem because a copy of the xlsx file was added to your application and the .exe always uses this copy of the file. To prevent this,
In your code use
path='full path of your excel file';
file=xlsread(path);
plot(..)
After this when you are creating the .exe using the Application Compiler, make sure that the excel file is not added in files required for your application to run. This way your application will read the excel file directly from the source. However this application will work only on your pc as the path may not be valid in another pc.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!