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.

Sign in to comment.

More Answers (0)


Find more on Matrices and Arrays 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!

Translated by