How to read first column containing names of shapefiles from data matrix?

8 ビュー (過去 30 日間)
Devendra
Devendra 2024 年 4 月 8 日
コメント済み: Devendra 2024 年 4 月 8 日
I want to read excel csv file which is attached here using readmatrix matlab command. I want to use only readmatrix matlab command to read the first column containing names of shape files since remaining data has already been extracted and analysed. I need the names of shape files to write in to final output file.
Please suggest me how to do it.
Deva

採用された回答

Ayush Modi
Ayush Modi 2024 年 4 月 8 日
編集済み: Ayush Modi 2024 年 4 月 8 日
Hi Devendra,
You can achieve this using additional import options opts in the readmatrix function.
opts = detectImportOptions('sample.csv');
opts.SelectedVariableNames = 1;
shapefileNames = readmatrix("sample.csv", opts);
Please refer to the following MathWorks documentation for more information on the import options of "readmatrix" function:
  1 件のコメント
Devendra
Devendra 2024 年 4 月 8 日
yes, it worked. Thanks a lot for your help.
Deva

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Analysis についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by