Beginner MATLAB question (I just started using matlab a week ago)

2 次查看(过去 30 天)
Please help give the function to solve this. Thank you

采纳的回答

Stephen23
Stephen23 2019-1-27
编辑:Stephen23 2019-1-27
Simpler and more efficient to use logical indexing:
idx = ss(:,1)==1;
out = ss(idx,2)
If you really want to use |find|:
idy = find(ss==1);
out = ss(idy,2)
Basic MATLAB concepts, such as how to use indexing, are explained in the introductory tutorials:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by