{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Input" 2 19 "" 0 1 255 0 0 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 1 16 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Warning" -1 7 1 {CSTYLE "" -1 -1 " Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Error" -1 8 1 {CSTYLE "" -1 -1 "Courier" 1 10 255 0 255 1 2 2 2 2 2 1 1 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Out put" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 12 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Plot" -1 13 1 {CSTYLE "" -1 -1 "Time s" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT 256 68 "Reading a datafile into m aple, and then writing data to another file" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 152 "1) assume that you have an ASC II file which contains some data (e.g., an Excel datafile saved in ASC II format, using a blank as a separator, or a comma)" }}{PARA 0 "" 0 " " {TEXT -1 36 "In my example the file has the name " }{TEXT 19 8 "data file" }{TEXT -1 70 ", and contains a few rows with two floating point \+ numbers in each row." }}{PARA 0 "" 0 "" {TEXT -1 32 "2) know which dir ectory it is in" }}{PARA 0 "" 0 "" {TEXT -1 57 "3) there is a fast way to input a table into maple using " }{TEXT 19 8 "readdata" }{TEXT -1 54 ". For an example look at the bottom of this worksheet." }}{PARA 0 "" 0 "" {TEXT -1 104 "4) we will show a method with more control, whic h can also be used directly for generating an ASCII file" }}{PARA 0 " " 0 "" {TEXT -1 45 "5) we need to know 2 formatting characters, " } {TEXT 19 3 "%d " }{TEXT -1 14 " for integer, " }{TEXT 19 2 "%f" } {TEXT -1 30 " for floating point numbers (" }{TEXT 19 2 "%g" }{TEXT -1 136 " is also a general floating point format). For writing to file we could also use more specific formatting as provided by the C langu age." }}{PARA 0 "" 0 "" {TEXT -1 88 "6) we will read data one line at \+ a time. We can use a loop to go through the whole file." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 145 "Step 1 invo lves opening the file, in this case for read, by default it is in ASCI I format (readable by simple editors such as Notepad, DOS_EDIT)." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "fd := fopen(`C:/marko/PHYS20 30/datafile`,READ); # note the left-quotes, and use of forward slash. " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#fdG\"\"!" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 24 "res:=fscanf(fd,\"%f %f\");" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#>%$resG7$$\"\"!F'$!\"\"!\"#" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "fclose(fd);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 197 "On a Macintosh under OS/X the fopen command would look as follow s (/Users/marko in my case is recognized as my home directory in which I have a PHYS2030 subdirectory; it all starts at the root /):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "# fd := fopen(`/Users/marko/ PHYS2030/datafile`,READ);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 140 "By \+ closing the file, and then re-opening we position ourselves to read th e entire file in the second pass. Access to the data is as follows." } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "res[1],res[2];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$$\"\"!F$$!\"\"!\"#" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "nops(res);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\" \"#" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 13 "The function " }{TEXT 19 4 "nops" }{TEXT -1 43 " returns how many entries are in this list." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 86 "S upppose we want to read in the two columns and store them in separate \+ vectors called " }{TEXT 19 2 "xV" }{TEXT -1 5 " and " }{TEXT 19 2 "yV " }{TEXT -1 215 ". We could know beforehand how many entries there are , but let's see what can be done in case we don't. We simply open an a rbitrarily large loop and count. We will terminate the count when Mapl e reads no more lines." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 148 "First, re-open the file. You will need to adjust yo ur path on the computer that you are using. Maple's default directory \+ is not one you want to use." }}{PARA 0 "" 0 "" {TEXT -1 48 "Backward s lashes can be used as \\\\ instead of /." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "fd := fopen(`C:/marko/PHYS2030/datafile`,READ); # not e the left-quotes, and use of forward slash." }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#fdG\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "count:=0:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "for i from 1 to 100 000 do:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "res:=fscanf(fd,\"%f %f\" );" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "if nops(res)=0 then break" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "else" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "count:=count+1;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "xV[i]:=r es[1];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "yV[i]:=res[2];" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "fi:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "o d:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "fclose(fd);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 6 "count;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 88 "plo t([seq([xV[i],yV[i]],i=1..count)],style=point,symbol=cross,symbolsize= 25,axes=boxed);" }}{PARA 13 "" 1 "" {GLPLOT2D 984 473 473 {PLOTDATA 2 "6(-%'CURVESG6$7'7$$\"\"!F)$!3-+++++++5!#>7$$\"\"\"F)$\"\"#F)7$F0$\"3k *************4%!#<7$$\"\"$F)$\"3;+++++++iF57$$\"\"%F)$\"3M+++++++zF5-% 'COLOURG6&%$RGBG$\"#5!\"\"F(F(-%&STYLEG6#%&POINTG-%'SYMBOLG6$%&CROSSG \"#D-%+AXESLABELSG6$Q!6\"FS-%*AXESSTYLEG6#%$BOXG-%%VIEWG6$%(DEFAULTGFf n" 1 5 1 1 25 0 2 9 1 2 2 1.000000 45.000000 45.000000 0 0 "Curve 1" } }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "Suppose I need a fit through th e data. A straight line seems appropriate." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 57 "# ?fit # this is where you get the clue of how to \+ do it!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(stats):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "# fit[leastsquare[[x,y]]]([ [10,15,17,19],[3,4,5,6]]); # this is the clue" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 47 "You may think the next line is the answer. But " } {TEXT 19 2 "xV" }{TEXT -1 5 " and " }{TEXT 19 2 "yV" }{TEXT -1 110 " a re arrays and not lists. This is a pithole I fall into myself sometime s, but I learned how to get out of it!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "fit[leastsquare[[x,y]]]([xV,yV]);" }}{PARA 8 "" 1 "" {TEXT -1 107 "Error, (in stats/abort) [[fit[leastsquare[[x, y]]], requ ires data of type stats/data, received, [xV, yV]]]\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "xVL:=convert(xV,list);" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#>%$xVLG7'$\"\"!F'$\"#5!\"\"$\"#?F*$\"#IF*$\"#SF*" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "yVL:=convert(yV,list);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%$yVLG7'$!\"\"!\"#$\"#?F'$\"#TF'$\"#i F'$\"#zF'" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "whattype(xV); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%'symbolG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "whattype(xVL);" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#%%listG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "fit[leastsquar e[[x,y]]]([xVL,yVL]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#/%\"yG,&$\"++ +++M!#6\"\"\"*&$\"++++-?!\"*F)%\"xGF)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "LineFit:=rhs(%);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#> %(LineFitG,&$\"+++++M!#6\"\"\"*&$\"++++-?!\"*F)%\"xGF)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name changecoords has been redefined\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 93 "PL1:=plot([seq([xV[i],yV[i]] ,i=1..count)],style=point,symbol=cross,symbolsize=25,axes=boxed):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "PL2:=plot(LineFit,x=xV[1]..x V[count],color=blue,thickness=2):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "display(PL1,PL2);" }}{PARA 13 "" 1 "" {GLPLOT2D 1158 390 390 {PLOTDATA 2 "6'-%'CURVESG6&7'7$$\"\"!F)$!3-+++++++5!#>7$$\"\" \"F)$\"\"#F)7$F0$\"3k*************4%!#<7$$\"\"$F)$\"3;+++++++iF57$$\" \"%F)$\"3M+++++++zF5-%'COLOURG6&%$RGBG$\"#5!\"\"F(F(-%&STYLEG6#%&POINT G-%'SYMBOLG6$%&CROSSG\"#D-F$6%7S7$F($\"3C+++++++MF,7$$\"3Hmmmm;')=()F, $\"3Gmmm0h^&3#!#=7$$\"3RLLLe'40j\"Fen$\"33LL)fL!G/OFen7$$\"3mmmm;6m$[# Fen$\"3/mmcb&*G7`Fen7$$\"3fmmm;yYULFen$\"3alm'*o0iJqFen7$$\"3%HLL$eF>( >%Fen$\"3!>L$=-*zFu)Fen7$$\"3Qmmm\">K'*)\\Fen$\"3Qm;xkV#H.\"F57$$\"3P* ****\\Kd,\"eFen$\"3s**\\Y'\\$>(>\"F57$$\"3-mmm\"fX(emFen$\"3Mm;Xn33n8F 57$$\"3.*****\\U7Y](Fen$\"3h**\\[2MUO:F57$$\"3'QLLLV!pu$)Fen$\"3KLLvCI h5>5AF57$$\"3)*******p=\\ q6F5$\"3q***RPsCtP#F57$$\"3mmm;fBIY7F5$\"3,m;0Bt4HDF57$$\"3GLLLj$[kL\" F5$\"3jKLRB'p&4FF57$$\"3?LLL`Q\"GT\"F5$\"3[KLPMLXiGF57$$\"3!*****\\s]k ,:F5$\"3G**\\9NMHSIF57$$\"39LLL`dF!e\"F5$\"3[KL$F57$$\"33++]sgam ;F5$\"3k**\\9P_UqLF57$$\"3/++]F5$\"3uK$y\"eF2kQF57$$\"3immmTc-)* >F5$\"34mmhMt/MSF57$$\"3Mmm;f`@'3#F5$\"36l;0\\Jg5UF57$$\"3y****\\nZ)H; #F5$\"3#*)*\\`/bHkVF57$$\"3YmmmJy*eC#F5$\"3'fm'**euGIXF57$$\"3')****** R^bJBF5$\"3u)**z-Rt$GF5$\"3/l;HD4j.dF57$$\"3$*******pfa.F \\(eF57$$\"3#HLLeg`!)*HF5$\"3^J$y)=L5OgF57$$\"3w****\\#G2A3$F5$\"3g)* \\cz*yX?'F57$$\"3;LLL$)G[kJF5$\"3yJLVKZHpjF57$$\"3#)****\\7yh]KF5$\"3/ **\\igotTlF57$$\"3xmmm')fdLLF5$\"38mmID\">yq'F57$$\"3bmmm,FT=MF5$\"35l mtGAmxoF57$$\"3FLL$e#pa-NF5$\"3#=L=b%*)4YqF57$$\"3!*******Rv&)zNF5$\"3 &*)**z]zu3?(F57$$\"3ILLLGUYoOF5$\"3=KL7&Ql#ytF57$$\"3_mmm1^rZPF5$\"3% \\mYNkDp`(F57$$\"34++]sI@KQF5$\"3S**\\9r041xF57$$\"34++]2%)38RF5$\"3u) *\\\"=*H+oyF57$F<$\"3\")***********>/)F5-FA6&FCF(F($\"*++++\"!\")-%*TH ICKNESSG6#F1-%+AXESLABELSG6%Q!6\"Fj]l-%%FONTG6#%(DEFAULTG-%*AXESSTYLEG 6#%$BOXG-%%VIEWG6$;F($\"#SFFF_^l" 1 2 0 1 10 0 2 9 1 2 2 1.000000 48.000000 47.000000 0 0 "Curve 1" "Curve 2" }}}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 354 "Unfortunately, Maple's fit program does not return the uncertainties to the fitted slope and intercept. These are important, because the intercept is not zero, while we would have expected zero. Likewise, the slope is not equal to two, as we might have expected. K nowing the uncertainties is crucial for testing a hypothesis we have a bout the noisy data." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 176 "If you need this for the labs, go to Computational Phy sics using Maple, and look for the worksheets in the Experimental Phys ics section which code this following Taylor's book." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 127 "Excel also does not gi ve you uncertainties, but it gives a regression coefficient. That can \+ also be had from the stats package." }}{PARA 0 "" 0 "" {TEXT -1 0 "" } }{PARA 0 "" 0 "" {TEXT -1 246 "Now I will show you how to export the d ata so that you can use a better graphing program than Maple. This wou ld be important for more complicated results than a straight line, suc h as obtainable from nonlinear fits using the CurveFitting package." } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "fd := fopen(`C:/marko/PHYS 2030/data_out`,WRITE); # note the left-quotes, and use of forward slas h." }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#fdG\"\"!" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 8 "Np:=100;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#> %#NpG\"$+\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "dx:=(xV[coun t]-xV[1])/Np;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#dxG$\"+++++S!#6" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "for i from 1 to Np+1 do:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "x_i:=(i-1)*dx;" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "y_i:=eval(LineFit,x=x_i);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 80 "fprintf(fd,\"%f %f \\n\",x_i,y_i); # the \\n enters a linefeed at the end of a line." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "o d:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "fclose(fd);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "res:=readdata(`C:/marko/PHYS 2030/data_out`,2);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%$resG7aq7$$\" \"!F($\"&+S$!\"'7$$\"&++%F+$\"'!39\"F+7$$\"&++)F+$\"'gT>F+7$$\"'++7F+$ \"'SUFF+7$$\"'++;F+$\"'?VNF+7$$\"'++?F+$\"'+WVF+7$$\"'++CF+$\"'![9&F+7 $$\"'++GF+$\"'gXfF+7$$\"'++KF+$\"'SYnF+7$$\"'++OF+$\"'?ZvF+7$$\"'++SF+ $\"'+[$)F+7$$\"'++WF+$\"'!)[\"*F+7$$\"'++[F+$\"'g\\**F+7$$\"'++_F+$\"( S]2\"F+7$$\"'++cF+$\"(?^:\"F+7$$\"'++gF+$\"(+_B\"F+7$$\"'++kF+$\"(!G:8 F+7$$\"'++oF+$\"(g`R\"F+7$$\"'++sF+$\"(SaZ\"F+7$$\"'++wF+$\"(?bb\"F+7$ $\"'++!)F+$\"(+cj\"F+7$$\"'++%)F+$\"(!o:F+7$$\"(+++\"F+$\"(+g.#F+7$$\"( ++/\"F+$\"(!3;@F+7$$\"(++3\"F+$\"(gh>#F+7$$\"(++7\"F+$\"(SiF#F+7$$\"(+ +;\"F+$\"(?jN#F+7$$\"(++?\"F+$\"(+kV#F+7$$\"(++C\"F+$\"(![;DF+7$$\"(++ G\"F+$\"(glf#F+7$$\"(++K\"F+$\"(Smn#F+7$$\"(++O\"F+$\"(?nv#F+7$$\"(++S \"F+$\"(+o$GF+7$$\"(++W\"F+$\"(!)o\"HF+7$$\"(++[\"F+$\"(gp*HF+7$$\"(++ _\"F+$\"(Sq2$F+7$$\"(++c\"F+$\"(?r:$F+7$$\"(++g\"F+$\"(+sB$F+7$$\"(++k \"F+$\"(!GF+$\"(Sy(QF+7$$\"(++'>F+$\"(?z&RF+7$$\"(+++#F+$\"( +!QSF+7$$\"(++/#F+$\"(!3=TF+7$$\"(++3#F+$\"(g\")>%F+7$$\"(++7#F+$\"(S# yUF+7$$\"(++;#F+$\"(?$eVF+7$$\"(++?#F+$\"(+%QWF+7$$\"(++C#F+$\"(![=XF+ 7$$\"(++G#F+$\"(g&)f%F+7$$\"(++K#F+$\"(S'yYF+7$$\"(++O#F+$\"(?(eZF+7$$ \"(++S#F+$\"(+)Q[F+7$$\"(++W#F+$\"(!))=\\F+7$$\"(++[#F+$\"(g*)*\\F+7$$ \"(++_#F+$\"(S!z]F+7$$\"(++c#F+$\"(?\"f^F+7$$\"(++g#F+$\"(+#R_F+7$$\"( ++k#F+$\"(!G>`F+7$$\"(++o#F+$\"(g$*R&F+7$$\"(++s#F+$\"(S%zaF+7$$\"(++w #F+$\"(?&fbF+7$$\"(++!GF+$\"(+'RcF+7$$\"(++%GF+$\"(!o>dF+7$$\"(++)GF+$ \"(g(*z&F+7$$\"(++#HF+$\"(S)zeF+7$$\"(++'HF+$\"(?*ffF+7$$\"(+++$F+$\"( ++/'F+7$$\"(++/$F+$\"(!3?hF+7$$\"(++3$F+$\"(g,?'F+7$$\"(++7$F+$\"(S-G' F+7$$\"(++;$F+$\"(?.O'F+7$$\"(++?$F+$\"(+/W'F+7$$\"(++C$F+$\"(![?lF+7$ $\"(++G$F+$\"(g0g'F+7$$\"(++K$F+$\"(S1o'F+7$$\"(++O$F+$\"(?2w'F+7$$\"( ++S$F+$\"(+3%oF+7$$\"(++W$F+$\"(!)3#pF+7$$\"(++[$F+$\"(g4+(F+7$$\"(++_ $F+$\"(S53(F+7$$\"(++c$F+$\"(?6;(F+7$$\"(++g$F+$\"(+7C(F+7$$\"(++k$F+$ \"(!G@tF+7$$\"(++o$F+$\"(g8S(F+7$$\"(++s$F+$\"(S9[(F+7$$\"(++w$F+$\"(? :c(F+7$$\"(++!QF+$\"(+;k(F+7$$\"(++%QF+$\"(!o@xF+7$$\"(++)QF+$\"(g'zF+7$$\"(+++%F+$\"(+?/)F+" } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "nops(res);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"$,\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "res[4];" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7$$\"'++7!\"'$\"'SUFF&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 7 "So the " }{TEXT 19 8 "readdata" }{TEXT -1 204 " command would have saved us the hassle of opening the \+ file and closing it, and specifying the format, and it can read the en tire file at once, provided the lines are terminated with a linefeed c haracter." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "whattype(res); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%%listG" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 23 "The object produced by " }{TEXT 19 8 "readdata" }{TEXT -1 20 " is a list of lists." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "5 0 0" 144 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }