Can my MCR code access excel files without Matlab Builder Ex?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Data Export to MATLAB dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!