(Answers Dev) Restored edit
Beginner MATLAB question (I just started using matlab a week ago)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Matthew Worker
el 27 de En. de 2019
Comentada: Rena Berman
el 12 de Mzo. de 2020
Please help give the function to solve this. Thank you
2 comentarios
Respuesta aceptada
Stephen23
el 27 de En. de 2019
Editada: Stephen23
el 27 de En. de 2019
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:
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!