Effacer les filtres
Effacer les filtres

How can I save my .mat with a specific name after reading it with hdfread?

1 vue (au cours des 30 derniers jours)
Lucas Brande
Lucas Brande le 27 Avr 2021
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.

Réponses (1)

Walter Roberson
Walter Roberson le 27 Avr 2021
data = hdfread("YYYYMMDD.HDF","precipitaiton");
save("YYYYMMDD.mat","data");

Produits


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by