problem with wxmaxima, imaxima frontends



On Wed, Aug 13, 2008 at 8:13 AM, tyler <tyler.smith at mail.mcgill.ca> wrote:

>  doline() := block ([x, y, r],
>              set_random_state(make_random_state (654321)),
>              with_stdout("fit1.dat", for i : 1 thru 10 do (
>                                  x:i,
>                                  r: -0.2 + random(0.4),
>                                  y: 1 + x + r,
>                                  print(x,y))))$
>
>  doline()$
>  datamatrix: read_matrix("fit1.dat");

I think the data could be generated in a more straightforward way.

xx : makelist (i, i, 1, 100)$
yy : 1 + xx + makelist (random (0.4) - 0.2, i, 1, 100)$
datamatrix : transpose (matrix (xx, yy))$

That avoids problems with with_stdout.

HTH

Robert Dodier