how to extract data from .mat file?
11 次查看(过去 30 天)
显示 更早的评论
I have dataset in h5 format and i read that data using
x = hdf5read(file.GroupHierarchy.Datasets(1));
now x contain 2x1024x31200, I want to extrace 2x1024x10000 from it.
0 个评论
采纳的回答
SungJun Cho
2021-4-12
编辑:SungJun Cho
2021-4-12
If you want to extract first 10000 elements from the x, you can just do
extracted_x = x(:,:,1:10000);
% Or if you want specific indexing
begin = 101;
conclude = 10100;
extracted_x = x(:,:,begin:conclude);
Hope this helps.
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!