データストアを使用し​、CSVファイルの指​定列、指定行のデータ​を抽出

matlab 2018aを使用しています。
CSVファイルの指定列のデータを抜き出したくてtabularTextDatastore
SelectedVariableNamesを使用しています。
さらに指定行のデータを抜き出したいと思ったのですがデータストアを使用して抽出すことはできるのでしょうか。

 채택된 답변

Kazuya
Kazuya 2018년 11월 17일

1 개 추천

読み取る行に関しては NumHeaderLines プロパティで読み飛ばす行数を設定するか、ReadSize で読み取る行数を決めるくらいしか手段がないですね。ファイルの特定の行だけを読み取るなら、この2つで何とかなりそうですが、どうでしょう?

댓글 수: 1

yuuji yamada
yuuji yamada 2018년 11월 18일
なんとかなりそうです。ありがとうございました。

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

추가 답변 (1개)

madhan ravi
madhan ravi 2018년 11월 17일

0 개 추천

Read the while file using readtable() and then you can simply specify as such
T=readtable('mycsv.csv');
T.column %where T is your table and columns is the specific column you need

댓글 수: 2

yuuji yamada
yuuji yamada 2018년 11월 18일
ありがとうございます。ためしてみます。
madhan ravi
madhan ravi 2018년 11월 18일
Anytime :) , sure!

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

질문:

2018년 11월 17일

댓글:

2018년 11월 18일

Community Treasure Hunt

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

Start Hunting!