#pragma rtGlobals=3 // Use modern global access method and strict wave access. Function Diurnal_distrib(timeline,data,p1,p2,p3,p4,p5,wName) wave timeline, data variable p1,p2,p3,p4,p5 string wName string ListOfPercentiles =num2str(p1)+";"+num2str(p2)+";"+num2str(p3)+";"+num2str(p4)+";"+num2str(p5) Make/O/N=24 $("W_p1"+wName),$("W_p2"+wName),$("W_p3"+wName),$("W_p4"+wName),$("W_p5"+wName),$("avera"+wName) Wave W_p1=$("W_p1"+wName),W_p2=$("W_p2"+wName),W_p3=$("W_p3"+wName),W_p4=$("W_p4"+wName),W_p5=$("W_p5"+wName),avera=$("avera"+wName) //Make/O/N=24 W_p1,W_p2,W_p3,W_p4,W_p5,avera Make/O/N=24 temp_hour=p Make/O/N=(numpnts(data)) hour_data Make/O/T/N=24 txtWave txtWave=num2str(p) variable i for (i=0;i