How can I see just a couple of datapoint based on a specific criteria

1 Ansicht (letzte 30 Tage)
I have a dataset that consists of double where I would like to see those rows where the column 10 is equal to 1
I tried this:
dataset(dataset(:,10)==1)
which is working fine but gives me only the first column. I would like to see the whole row and therefore I tried this:
dataset(:,dataset(:,10)==1))
but that's not working. what am I doing wrong?

Akzeptierte Antwort

the cyclist
the cyclist am 24 Apr. 2013
Bearbeitet: the cyclist am 24 Apr. 2013
So close ...
>> dataset(dataset(:,10)==1,:)
  2 Kommentare
Locks
Locks am 24 Apr. 2013
Bearbeitet: Locks am 24 Apr. 2013
I tired that also, but it didn't work, I got this error:
dataset(dataset(:,10)==1),:)
|
Error: Unexpected MATLAB operator.
It's fine, I found it, a bracket was missing
the cyclist
the cyclist am 24 Apr. 2013
Sorry. I corrected that typo about 10 seconds after I posted, but you were too fast! Try the edited version.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Language Fundamentals finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by