What is the equivalent of
xlsread('data.xlsx','B5:B10')
in the
textscan
?

댓글 수: 3

Bob Thompson
Bob Thompson 2019년 6월 24일
To the best of my knowledge, you cannot specify a specific number of rows within textscan. You can tell it to ignore a number of rows at the beginning as 'headers,' but I don't believe it stops until it finishes the file once it actually starts reading.
sermet OGUTCU
sermet OGUTCU 2019년 6월 24일
Thank you Bob. Any alternative for textscan is available?

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

 채택된 답변

Guillaume
Guillaume 2019년 6월 24일

0 개 추천

The intent of the question is a bit unclear since textscan cannot parse excel files. If the intent is to parse a csv file, then both dlmread and csvread (which calls dlmread) accept a range.
In any case, it is very likely that parsing the text file would be a lot easier with readtable or readmatrix. The latter requires R2019a.

추가 답변 (0개)

카테고리

태그

질문:

2019년 6월 24일

답변:

2019년 6월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by