lib: use NaN values in fortran, add plot_f0.m script