MATLAB Answers

how to save part of data in a table/matrix into another table and count the number of rows at certain columns

1 view (last 30 days)
addy fang
addy fang on 20 Jul 2020
I have a table with many columns and rows in a table, e.g., column 1, 2, 3, 4, 5, 6,... every three columns are one group, (1, 2, 3), (4, 5, 6),...
First, I need to save the rows in those groups meeting certain criteria into another table. For example, save the rows of column 1, 2 and 3 with column3 value larger than 10, the rows of columns 4, 5 and 6 with column6 value larger than 10, ... in new columns 1, 2, 3, 4, 5, 6...
Second, now column groups (1,2,3), (4,5,6), ... may have different number of rows. I need to count the numer of the rows in the first three columns and save them at the end of the first three columns, ans so for the next three columns....
How can I do that? Thank you.

  0 Comments

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by