How to find the corresponding value of an element in same row, but different column?
6 ビュー (過去 30 日間)
古いコメントを表示
Hi everyone,
Perhaps a silly question, but:
I have several matrices that are approx. 1500-2000 rows and 13 columns each (corresponding to single-trial data, so one matrix per trial; from deeplabcut if anyone is familiar). I have a for-loop that uses the find function to find a specific element in column #13 for each matrix and lists them in a single column (so if I have 50 trials, I would then have a column of 50 numbers). I now simply want to find the corresponding element in column #1 (from the same row!) for each trial and generate another such list. Column #1 contains timestamp information, so I'm looking for the timestamp corresponding to the element found in column #13.
Here is some dummy code so far (this is after narrowing the data down to a specific range):
element_list = find(data(:,13);
element_I_want = element_list(1)
element_timestamp = ????
Thank you!!! I've tried a few things but keep getting errors. I'm sure I'm just missing something simple.
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!