how to add missing months in loop?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have a monthly soil moisture data of 10 year in hdf format. The data file contains 105 hdf file, 15 months are missing. The dimension of matrix is 180*360 now I want to create this matrix in 180*360*120. How could I add missing months in a loop.
2 comentarios
Respuestas (1)
Stephen23
el 18 de Feb. de 2015
Editada: Stephen23
el 18 de Feb. de 2015
Use one of the interpolation tools , filling in missing data is exactly what they can do. Which tool you select depends on the shape of your data, and your own requirements for the "filling" in of the data. For a start, try interp1 .
Note that you can interpolate all of the data at once, without loops, by using the matrix input of most of these functions, eg for interp1: If you have multiple sets of data that are sampled at the same point coordinates, then you can pass v as an array. Each column of array v contains a different set of 1-D sample values.
Note that interpolation does not require any loops, even though you put this in the question title.
0 comentarios
Ver también
Categorías
Más información sobre HDF5 en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!