フィルターのクリア

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 Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by