how to find the smallest length filled with numbers

1 view (last 30 days)
I need to find the column with the least amount of digits e.g 5 rows in the case below

Accepted Answer

Peng Li
Peng Li on 26 Mar 2020
[~, indCol] = min(sum(~isnan(yourArray), 1));
indCol is the index for the column you need.
  4 Comments
Dinouk Goonewardena
Dinouk Goonewardena on 26 Mar 2020
how do i combine that with indCol? coz i need it to delete the minimum column length

Sign in to comment.

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!