Dot indexing is not supported for variables of this type.

3 ビュー (過去 30 日間)
Ryan
Ryan 2022 年 11 月 10 日
回答済み: Image Analyst 2022 年 11 月 10 日
sh_16_data = importdata("M006_A_Shaker_16.txt");
sh_16_freq = sh_16_data.data(:,2)
Data:
1.000 25.000 10.430 2.848
2.000 26.000 13.824 2.705
3.000 27.000 18.449 2.130
4.000 28.000 20.689 1.098
5.000 29.000 18.676 0.500
I am trying to take the second column as a variable but it immediately gives me the "Dot indexing is not supported for variables of this type."
Any help is appreciated.

採用された回答

Image Analyst
Image Analyst 2022 年 11 月 10 日
Try readmatrix instead.
If you have any more questions, then attach your data (text file) with the paperclip icon after you read this:

その他の回答 (1 件)

Davide Masiello
Davide Masiello 2022 年 11 月 10 日
You are assuming that sh_16_data is a structure.
Instead, do
sh_16_freq = sh_16_data(:,2)

カテゴリ

Help Center および File ExchangeLarge Files and Big Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by