How to use logical operator '&' between two or more categorical arrays of a table to get particular rows?

조회 수: 5 (최근 30일)
I have a table with some categorical columns,i want to use '&' operator between them to select particular rows of the table,how can i do this?
  댓글 수: 6
Azzi Abdelmalek
Azzi Abdelmalek 2016년 3월 29일
A simple way to explain your problem, is to post a small example(5x4 array for example) , with the expected result
kiarash Dousti
kiarash Dousti 2016년 3월 29일
I found the way.That is something like this:
rows = t1.Var7 == 'Sales' & t1.Var15 == '>50K';
it returns a logical array with the size of table rows! 1 shows the above condition is satisfied and 0 not!! it is solved.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Categorical Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by