Clear Filters
Clear Filters

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 views (last 30 days)
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.

Accepted Answer

Sri Harish G
Sri Harish G on 10 Jul 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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!