MATLAB Answers

Filter table by lenght of elements in one column.

1 view (last 30 days)
Ajpaezm on 3 May 2019
Hi, I'd like to filter, without using loops, a table by the lenght of an element in a given column. The lenght for my scenario must match 12 in this case.
I tried this, and it was effective, but not sure if it was the most effective one:
filtered_table = myTable(cellfun('length',myTable.thatColumn)==12, :);
I'd like to know if more efficient variations are possible, this is the only one I know unfortunately.
Thanks in advance.


Sign in to comment.

Answers (0)

Sign in to answer this question.