フィルターのクリア

matrix search and the save on a new matrix

1 回表示 (過去 30 日間)
André Sousa
André Sousa 2014 年 5 月 20 日
回答済み: Yao Li 2014 年 5 月 20 日
Hi there. I have a 2 collumn ndm a couple thousand rows matrix. The first collumn has some number labels and the second collumn has zeros or ones. I want to locate the ones of the second collumn and save them with the corresponding labels on a new matrix. How can I do it? Regards

回答 (1 件)

Yao Li
Yao Li 2014 年 5 月 20 日
find(a(:,2)) can be used to find the index of the non-zero rows.

Community Treasure Hunt

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

Start Hunting!

Translated by