MATLAB Answers

finding location of logical 1 row wise by column

2 views (last 30 days)
Hi, I have a 8 x 621 logical and I would like to extract the row location of the logical 1 by columns i.e the result should be ans = [ 5 8 3 8 ....]
How may I do that?
Thank you!

  0 Comments

Sign in to comment.

Accepted Answer

Stephen Cobeldick
Stephen Cobeldick on 15 Oct 2019
[idr,~] = find(yourMatrix)

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.