Can my MCR code access excel files without Matlab Builder Ex?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to access an excel file with MCR code. As a proof of concept I created the basic code bellow which simply opens a standard dialog box to select the desired excel folder, loads it into the workspace and then plots it. This code is at the end of the automatically generated GUI code through GUIDE, with an 'Execute' push button, a plot, and uitable. When run in MATLAB the GUI functions as intended, with the plot and table propagating. When this same code is compiled and run in MCR the dialog box will still open, but nothing happens after the excel file is selected. Is it possible to access excel files in this manner or does MATLAB Builder Ex need to be used?
MATLAB 2014a
filename = uigetfile('c:')
val = xlsread(filename)
plot(val(1,:), val(2,:))
uitable1 = uitable('Data',val)
As noted before the rest of the code is the automatically generated GUI code.
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Data Export to MATLAB in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!