#pragma rtGlobals=1 // Use modern global access method. Menu "Dynamics" "Calc Correlation Function Panel" "Calculate Position Panel" End Function NoTImeSteps(ctrlName,varNum,varStr,varName) : SetVariableControl String ctrlName Variable varNum String varStr String varName nvar gnosteps,gtimemax Make/n=(gnosteps)/o qxpos_time=p*gtimemax/(gnosteps-1),rxpos_time End Function MaxTime(ctrlName,varNum,varStr,varName) : SetVariableControl String ctrlName Variable varNum String varStr String varName nvar gnosteps,gtimemax Make/n=(gnosteps)/o qxpos_time=p*gtimemax/(gnosteps-1),rxpos_time End Function CalculateXpos(ctrlName) : ButtonControl String ctrlName nvar gnosteps,gtimemax,gneda,gks,gDiffCoeff Make/n=(gnosteps)/o qxpos_time=p*gtimemax/(gnosteps-1),rxpos_time Rxpos_time[0]=0 variable counter=0,tau=gneda/gks //First Calculate the flutuations for all time steps Make/n=(gnosteps)/o g_of_t do g_of_t[counter]=gDiffcoeff*enoise(1) counter+=1 while(counter