Extract certain rows from matrix
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have extracted the peak data from a 1x86400 matrix in the workspace (named a) using the following command:
[pks,locs]=findpeaks(a)
This results in 'pks' = 1x14382 and the 'locs' positions for the obtained data (Also sized at 1x14382).
I would like to use the locations (locs) from the above to extract data from another 1x86400 data file (in this case named b).
Whats the best approach to do this?
0 个评论
采纳的回答
Andrew Newell
2015-3-6
编辑:Andrew Newell
2015-3-6
Assuming you read the other data file into another_matrix, the answer is
extracted_data = another_matrix(loc);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!