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

조회 수: 1 (최근 30일)
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?

채택된 답변

the cyclist
the cyclist 2013년 4월 24일
편집: the cyclist 2013년 4월 24일
So close ...
>> dataset(dataset(:,10)==1,:)
  댓글 수: 2
Locks
Locks 2013년 4월 24일
편집: Locks 2013년 4월 24일
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 2013년 4월 24일
Sorry. I corrected that typo about 10 seconds after I posted, but you were too fast! Try the edited version.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by