ismember to filtered table
이전 댓글 표시
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
답변 (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.
카테고리
도움말 센터 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!