how to read excel data

1 次查看(过去 30 天)
jimaras
jimaras 2014-1-30
Hello everyone,
I want to create a function which will read data from a given excel file and will return different vectors, each corresponding to a different vector (numerical data only). Do you have any idea?
thank you

回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2014-1-30
To get numerical data
v=xlsread('your_file.xlsx')
  5 个评论
jimaras
jimaras 2014-1-30
编辑:Azzi Abdelmalek 2014-1-30
and in the command window I set
filename='excelfile.xlsx';
Azzi Abdelmalek
Azzi Abdelmalek 2014-1-30
This doesn't make any sens, you are just replacing the function xlsread by Transformation. Just write
K=xlsread('yourfile.xls')
Then do whatever you want with the matrix K. And it's a bad idea to separate it to many vectors. If you want a third column, you can get it by
K(:,3)

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by