Can my MCR code access excel files without Matlab Builder Ex?

조회 수: 2 (최근 30일)
Young Fortinbras
Young Fortinbras 2015년 1월 22일
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개)

카테고리

Help CenterFile Exchange에서 Data Export to MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by