Info

この質問は閉じられています。 編集または回答するには再度開いてください。

??? Attempt to reference field of non-structure array. Error in ==> at 11 x=data.x;

1 回表示 (過去 30 日間)
LOKESH
LOKESH 2016 年 3 月 23 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I am using a dataset heart.dat. When I run i get this error..Any suggestion/error?
Code:
data=load('heart.dat'); x=data.x; x=x';
Thanks
  3 件のコメント
LOKESH
LOKESH 2016 年 3 月 23 日
https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/heart/
yes it does not contain x..actually i am doing clustering on this dataset
Adam
Adam 2016 年 3 月 23 日
編集済み: Adam 2016 年 3 月 23 日
What are you expecting x to be then?
You get a 270*14 numeric matrix when you load that data, not a struct. If you want a specific column of the data you can use e.g.
x = data(:,1);
but it depends entirely what you want to access from the data.

回答 (0 件)

この質問は閉じられています。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by