Read each columns of xls,csv,... as a matrix

조회 수: 1 (최근 30일)
Mtlb Usr
Mtlb Usr 2011년 1월 31일
I have got a several CSV and XLS files and I want to read with a MATLAB wizard to read each column as a matrix.
I have tried it with these files and only I got it with csv file.
What is the rule for read these files in this way?
  댓글 수: 2
Doug Hull
Doug Hull 2011년 2월 2일
What is happening when you fail? When you say "read as a matrix" do you mean "read as a vector"?
Mtlb Usr
Mtlb Usr 2011년 2월 3일
Exactly, when I said "read as a matrix" I would want to say "..as a vector".

댓글을 달려면 로그인하십시오.

답변 (3개)

the cyclist
the cyclist 2011년 2월 2일
Are you using a Mac? Macs can't read Excel files:
http://www.mathworks.com/support/solutions/en/data/1-2SJUON/index.html?solution=1-2SJUON
  댓글 수: 1
Davide Ferraro
Davide Ferraro 2011년 2월 3일
XLSREAD is able to read Excel file also on MAC OS. You won't obtain all the functionalities related to the COM (that's available only on Windows OS) but you will still be able to read the file in basic mode.

댓글을 달려면 로그인하십시오.


Mtlb Usr
Mtlb Usr 2011년 2월 3일
I'm not using a Mac.

Davide Ferraro
Davide Ferraro 2011년 2월 3일
To read an Excel file you should use XLSREAD:
The syntax:
[num,txt,raw] = xlsread(filename,range)
allows you to select a specific range. This should be a string with the same format you would use in Excel (e.g. 'B2:B8' to read from cell B2 to cell B8).

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by