필터 지우기
필터 지우기

Conditional equation X1=X(y==1) ?

조회 수: 2 (최근 30일)
Safouane Chergui
Safouane Chergui 2017년 7월 13일
답변: Fangjun Jiang 2017년 7월 13일
I have a matrix X and a column vector y. When I write something like X1=X(y==1), I only get the numbers from the first column of X. How to get numbers from all others columns when y==1 ?

채택된 답변

Fangjun Jiang
Fangjun Jiang 2017년 7월 13일
X1=X(y==1,:)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by