Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Trying to generate a plot from an Excel file.

1 vue (au cours des 30 derniers jours)
Morgan Rupard
Morgan Rupard le 24 Fév 2015
Clôturé : MATLAB Answer Bot le 20 Août 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!

Réponses (0)

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by