Skip to content

Instantly share code, notes, and snippets.

@blippy
Created November 18, 2015 18:56
Show Gist options
  • Save blippy/08a7bb28e441acc3c6c0 to your computer and use it in GitHub Desktop.
Save blippy/08a7bb28e441acc3c6c0 to your computer and use it in GitHub Desktop.
HDF5 in Octave
#!/home/mcarter/.local/bin/octave-cli -qf -W
# -*- octave -*-
1;
h5name = "/home/mcarter/temp.h5"
printf("Hello world\n");
pkg load hdf5oct
data = h5read(h5name, "/D20151113/rs6mb");
source ~/stuff.m
format none
data = delnan(data);
qs = quantile(data, 0:0.1:1);
h5write(h5name, "/D20151113/Deciles", qs)
print qs
function std_way ()
load /home/mcarter/cubie/home/mcarter/data/sharelock.h5 -hdf5;
rs = D20151113.rs6mb
printf("%6f %15f\n", decile(rs)')
argv()
#a = ["hello"; "world"];
#b = [20; 30];
epic = D20151113.epic;
for i=1:rows(epic)
printf("%5s %6.2f\n", epic(i,:), rs(i))
endfor
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment