필터 지우기
필터 지우기

Xlsread command in Matlab

조회 수: 1 (최근 30일)
Francesco
Francesco 2014년 2월 11일
댓글: Francesco 2014년 2월 21일
How Can I extract each columns with the xlsread command.
for i1 = 2:n1+1
matrix = xlsread();
end

채택된 답변

Mischa Kim
Mischa Kim 2014년 2월 21일
편집: Mischa Kim 2014년 2월 21일
Francesco, with xlsread you read the entire spreadsheet. Which means, that you can read an entire matrix as is, at once. E.g., from the MathWorks documentation:
values = {1, 2, 3; 4, 5, 6; 7, 8, 9}; % write matrix to .xlsx file
headers = {'First','Second','Third'};
xlswrite('myExample.xlsx', [headers; values]);
and then
filename = 'myExample.xlsx'; % read matrix from file
A = xlsread(filename)
1 2 3
4 5 6
7 8 9
as expected, A is read as a 3-by-3 matrix.
  댓글 수: 2
Francesco
Francesco 2014년 2월 21일
Kim, this question is not very important. It's a old matter. But I am happy that you reply me! Thanks!
Francesco
Francesco 2014년 2월 21일
I would like to say you if it's very difficult to reply at this questions? Can I hear you opinion?

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by