How can I save my .mat with a specific name after reading it with hdfread?
6 次查看(过去 30 天)
显示 更早的评论
Hello
I am currently working with a bunch of HDF files named YYYYMMDD.hdf
Each HDF file contains a matrix with pricipitation values that I need to extract.
whenever I run
hdfread("YYYYMMDD.HDF","precipitaiton")
On my workspace I end up with a file name ans.mat . I would like to be able to change the name in which this file is saved to match, if possible, my YYYYMMDD format, so YYYYMMDD.mat.
Thanks in advance.
0 个评论
回答(1 个)
Walter Roberson
2021-4-27
data = hdfread("YYYYMMDD.HDF","precipitaiton");
save("YYYYMMDD.mat","data");
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 HDF5 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!