Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

1 Ansicht (letzte 30 Tage)
LOKESH
LOKESH am 23 Mär. 2016
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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 Kommentare
LOKESH
LOKESH am 23 Mär. 2016
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 am 23 Mär. 2016
Bearbeitet: Adam am 23 Mär. 2016
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.

Antworten (0)

Diese Frage ist geschlossen.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by