#pragma rtGlobals=3 // Use modern global access method and strict wave access. Function Movie_projector_from2Dmatrix2( inW ) Wave inW // input wave // local variables Variable ii = 0, dd = 1 // define path for storig movie Newpath/O/Q/M="choose a folder were to store the created movie" Path1 // make two 1D waves to put traces make/o/n = ( dimSize( inW, 0 ) ) crop1, crop2 // display window with two traces dowindow/k graph1 display /n = graph1 crop1 appendtograph /w = graph1 /l = left1 crop2 // modify properties of graph Modifygraph /w = graph1 grid(left)=1,grid(left1)=1 Modifygraph /w = graph1 axisEnab(left)={0,0.45},axisEnab(left1)={0.5,0.95} Modifygraph /w = graph1 freePos(left1)={0,bottom} Modifygraph /w = graph1 gridRGB(left)=(0,0,0),gridRGB(left1)=(0,0,0) modifygraph /w = graph1 width=900,height=550, fSize=12, margin(bottom)=150, margin(top)=0 modifygraph /w = graph1 zero(left)=1,zeroThick(left)=4, zero(left1)=1,zeroThick(left1)=4 // Label/w= graph1 left "intensity (a.u.)"; Label/w= graph1 bottom "time (s)" // erase file if it exists DeleteFile /P = Path1 /Z "movie1.mov" // doupdate dowindow/f graph1 newMovie/P = Path1 /F = 2 /O as "movie1.mov" // display each trace individualy do ii = min( ii, dimsize(inW,1)-1) dd = min( dd, dimsize(inW,1)-1) crop1[ ] = inW[ p ][ ii ]; crop2[ ] = inW[ p ][ dd ]; textBox/w= graph1/n =text1/k textBox/w = graph1/n = text1/a = MB /f = 0 /E=2 "# : "+num2str( ii ) AppendText /W = graph1 /N = text1 "# : "+num2str( dd ) DoUpdate/W=graph1 AddMovieFrame ii += 2; dd += 2 if( ii >= dimSize( inW, 1 ) ) break endIf // while( 1 ) killwindow graph1 closemovie Playmovie end