ismember to filtered table
Mostrar comentarios más antiguos
i am trying to filter a dataset by using ismember(...), which gives me a logical array and the indexes. now i want to put it in a table but i'm not sure how to do that. can someone help me out?
code:
[a,b]=ismember('meta_data_mri.MRID','MRIdata.subjects');
tbl_meta_data_mri_filtered = ???
output:
>> [a,b]=ismember('meta_data_mri.MRID','MRIdata.subjects')
a =
1×18 logical array
0 1 1 1 0 1 1 1 1 0 0 0 0 1 1 1 1 0
b =
Columns 1 through 12
0 13 6 5 0 4 5 6 5 0 0 0
Columns 13 through 18
0 8 1 2 3 0
Respuestas (1)
That's doing ismember with the names of the files.
[a,b]=ismember('meta_data_mri.MRID','MRIdata.subjects')
[a,b]=ismember('abbacadcemoqsuwy','abcdefghijkrstuvwxyz')
If you want to operate on the actual data, first you must read the contents of the files into variables, e.g., using readtable, readmatrix, or readcell, etc., depending on the format and contents of the files.
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!