Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Trying to generate a plot from an Excel file.

1 Ansicht (letzte 30 Tage)
Morgan Rupard
Morgan Rupard am 24 Feb. 2015
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hello all! I am trying to take some imported data from an excel file (.xls) in order to generate a plot of it where the x-axis is the A column and the y-axis is B-column.
Here is the code:
filename = 'PlotCycles.xls';
sheet = 1;
xlRange = 'A1:A1430';
ylRange = 'B1:B1430';
x = xlsread(filename, sheet, xlRange);
y = xlsread(filename, sheet, ylRange);
Plot(x,y)
I am getting an error that says "Warning: Could not start Excel server for import, 'basic' mode will be used. Refer to HELP XLSREAD for". This is fine I think because I only want a numerical array anyways. The next error I get is:
"In xlsread at 187
In PlotCycles at 5
Warning: Range cannot be used in 'basic' mode. The entire sheet will be loaded.
In xlsread at 200
In PlotCycles at 5
Error using xlsread (line 247)
File contains unexpected record length. Try saving as Excel 98.
Error in PlotCycles (line 5) x = xlsread(filename, sheet, xlRange);"
I'm really not sure what to do in this situation, I'd appreciate any input thanks!

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by