; IDL Version 7.1.1 (linux x86_64 m64) ; Journal File for tarrl@helios ; Working directory: /nfs/home/tarrl ; Date: Thu Jun 2 09:24:06 2011 a = randomu(5,1000,1000) display, a plot_image, a ? a = 5 b = 6 if ( a gt b ) then print, 'a is greater than b!' else print, 'no it is not' ;no it is not a = 10 if ( a gt b ) then print, 'a is greater than b!' else print, 'no it is not' ;a is greater than b! if (a gt b) then begin $ c = a + b & $ plot, findgen(11) & $ endif print, c ; 16 for j=0,50 print, j ; % Syntax error. for j=0,50 do print, j ; 0 ; 1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 9 ; 10 ; 11 ; 12 ; 13 ; 14 ; 15 ; 16 ; 17 ; 18 ; 19 ; 20 ; 21 ; 22 ; 23 ; 24 ; 25 ; 26 ; 27 ; 28 ; 29 ; 30 ; 31 ; 32 ; 33 ; 34 ; 35 ; 36 ; 37 ; 38 ; 39 ; 40 ; 41 ; 42 ; 43 ; 44 ; 45 ; 46 ; 47 ; 48 ; 49 ; 50 for j=0,10 do begin $ c +=j & $ print, c & $ endfor ; 16 ; 17 ; 19 ; 22 ; 26 ; 31 ; 37 ; 44 ; 52 ; 61 ; 71 for j=0,10 do begin $ if (j gt 5) then print j & $ ; % Syntax error. if (j gt 5) then print, j & $ endfor for j=0,10 do begin $ if (j gt 5) then print, j & $ endfor ; 6 ; 7 ; 8 ; 9 ; 10 j = 0 while (j lt 10) do begin $ print, j & $ j +=1 & $ endwhile ; 0 ; 1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 9 t = findgen(1000) tm = t/60. data = fltarr(1000,4) a = findgen(4,4) print, a ; 0.00000 1.00000 2.00000 3.00000 ; 4.00000 5.00000 6.00000 7.00000 ; 8.00000 9.00000 10.0000 11.0000 ; 12.0000 13.0000 14.0000 15.0000 print, a[0,0] ; 0.00000 print, a[1,0] ; 1.00000 print, a[1,2] ; 9.00000 print, a[0:1,2] ; 8.00000 9.00000 print, a[[0,1],2] ; 8.00000 9.00000 print, a[[0,3],2] ; 8.00000 11.0000 print, a[[0,3],*] ; 0.00000 3.00000 ; 4.00000 7.00000 ; 8.00000 11.0000 ; 12.0000 15.0000 b = sin(t) help, b data[*,0] = b plot, data[*,0] b = sin(t/200.) data[*,0] = b plot, data[*,0] b = cos(t/200.) plot, data[*,1] data[*,1] = b plot, data[*,1] data[*,2] = exp(-t/500) plot, data[*,2] plot, data[*,3] for j = 0,3 do begin $ oplot, data[*,j] & $ endfor plot, data[*,3], yrange=[-1.,1] for j = 0,3 do begin $ oplot, data[*,j] & $ endfor plot, data[*,3], yrange=[-1.,1] for j = 1,2 do begin $ oplot, data[*,j] & $ endfor for j = 0,200 do begin $ endfor ; % Syntax error. for j = 0,200,10 do begin $ print, j & $ endfor ; 0 ; 10 ; 20 ; 30 ; 40 ; 50 ; 60 ; 70 ; 80 ; 90 ; 100 ; 110 ; 120 ; 130 ; 140 ; 150 ; 160 ; 170 ; 180 ; 190 ; 200