#! /usr/bin/octave load 20080829a.dat [time, x, y, z, dt, dx, dy, dz, ds, hr, dist] = forerunner(data_20080829a); k = 0; N=size(hr); for i = 1:N(2) if (hr(i)>0) k++; rest_hr(k) = hr(i); rest_time(k) = time(i); endif endfor mean_hr = mean(rest_hr) max_hr = max(rest_hr) min_hr = min(rest_hr) std_hr = std(rest_hr) maxx = max(rest_time./60); __gnuplot_set__ term png __gnuplot_set__ output "20080829a_rest_hr.png" #__gnuplot_set__ multiplot __gnuplot_set__ title "Resting Heart Rate Sleeping Aug. 29: Heartrate (beats/min)" __gnuplot_set__ xlabel "Time in Minutes" __gnuplot_set__ ylabel "Heartrate (beats/min)" #__gnuplot_set__ ydata time #__gnuplot_set__ timefmt "%S" #__gnuplot_set__ format y "%M:%S" __gnuplot_set__ yrange [0:190]; __gnuplot_set__ xrange [0:maxx]; __gnuplot_set__ grid x=0:1:maxx; Z = but_zones(164); #__gnuplot_set__ label "Heartrate"; plot (rest_time/60, rest_hr) #__gnuplot_set__ nomultiplot