-1

I need a script to export data from Matlab to HDF4 format. The variable which I want to store in hdf4 file has dimensions 3128*242*256 (int 16 type).

Thanks

icedwater
  • 4,701
  • 3
  • 35
  • 50
shrey
  • 223
  • 3
  • 16
  • Don't post (badly framed) duplicates of a question that you have already asked and which have been put on hold. Correct the errors in that question and you can expect the hold to be lifted. Your behaviour is not in line with SO etiquette. – High Performance Mark Jun 09 '14 at 17:29

1 Answers1

0

use following routines:

x = ones (3128, 242, 256) ;
hdf5write ('file path', 'dataset name' , x )

Above code will create hdf5 file and containing a dataset having 3D matrix containing values 1.

User1551892
  • 3,236
  • 8
  • 32
  • 52
  • I need the output in HDF4 format not HDF5. I followed the steps given :http://www.mathworks.in/help/matlab/import_export/exporting-to-hierarchical-data-format-hdf4-files.html I am getting a very small output file(2-3 Kb ;expected size around 370 MB). – shrey Jun 11 '14 at 05:45