help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple advice needed on input and output


From: Przemek Klosowski
Subject: Re: simple advice needed on input and output
Date: Tue, 24 Jul 2012 12:02:43 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

You requested the following things:

Do I have to append ine by line to a file? Is that a bit slow? I
have a lot of lines. about 10 000 000.

I have a "for" loop in wich "i" ranges from 1 to say 5000. How can I
make as many variables with the help of "i" to keep them in Octave
memory?

A * U * r * U * r
> A * U * r * U * s
> A * U * r * U * l

which makes me think that you want to perform 10 million matrix multiplies and store them in a file in some organized way. You could do it by creating a column vector:

 for i=1:5000; r(i,1)=????; end
 save -ascii OutputFile r

The fundamental question is what is the pattern for those calculations. Surely you aren't planning to generate millions of matrix expressions like the three above by hand, so what is the plan here?

Maybe instead of generating the file with matrix expressions and then reading it back and executing, you could think of a way to specify those calculations directly in a loop, replacing the question marks I put in there?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]