Read and write files.



Marco Rofei escribi?:
> Hi everyone, I need some help.
>
> I have 5.000 files, each one containing a matrix. For each file i need 
> maxima read the matrix, and print a graph.
> Files has numerical names (1,2,3,4,5...) and i want maxima read file 1 
> and print graph in jpg-format. The pic name has to be the same as 
> imput file-name.
>
> Is possible to use a *for* instruction to reach this result?
>
> for examble
>
> *for i:1 step 1 thru 5000 *
> *do (*
> *....*
> *read_matrix("...path.../i-th file");*
> *.....*
> *draw2d( ... , file_name = "...path.../i-th file", ...)*
> *)*
>
>
> Thanks
> MR

Hello,

Instead of "...path.../i-th file", you can use something like

concat("...path.../", i, "-th file"),

where i is the loop index. Note also that statements must be separated 
by commas (,) inside the 'do' context, not by semi-colons (;).


--
Mario