How can we read specific rows from an excel file in matlab?

조회 수: 36 (최근 30일)
Satya Gopal
Satya Gopal 2019년 11월 8일
답변: KSSV 2019년 11월 8일
Hi all,
I'm sure this question has been floating around for a while. I haven't found a satisfactory answer yet to my specific concern. So, I have a master excel file of data (both string and numeric values) that needs to be divided into many excel files based on the category (say: delta, beta, alpha etc) which is in a certain column.
A way to do this could be that these values are at certain specific rows. Delta values are at row 5,10,15,20,25....Same with the others. Any way I can read the file into a matrix and seperate out delta values into a file and alpha into another and so on?
Satya

채택된 답변

KSSV
KSSV 2019년 11월 8일
Read about readtable.
T = readtable(filename) ;
YOu can access the columns using T.(1), T.(2) or T.(alpha), T.(beta), etc.
Also you can use xlsread but this has become of old.
[num,txt,raw] = xlsread(filename) ;
num is your matrix data.

추가 답변 (0개)

카테고리

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