[Top][All Lists]

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

Re: How do I print and save tables?

From: Ron . Simonson
Subject: Re: How do I print and save tables?
Date: Fri, 12 Sep 2014 19:16:52 -0700
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0.6esrpre) Gecko/20120713 Thunderbird/10.0.6

I may have not fully understood what you were asking for.
Have you looked at the command save?  Type "help save"
in octave.  If you have a variable a, given by:

  a = [1, 2, 3; 4, 5, 6; 7,8,9];

and then type:

  save mydata.text a

you should get a file, mydata.text with something similar
to the following:

# Created by Octave 3.4.0, Fri Sep 12 19:09:47 2014 PDT <address@hidden>
# name: a
# type: matrix
# rows: 3
# columns: 3
 1 2 3
 4 5 6
 7 8 9

From this you can extract your data.  To get data into
latex form you can use fprintf (help fprintf, in octave.
This will likely involve loops which are generally frowned
on in octave since it is pretty slow and inefficient.
Others will likely give you much better advise than what
I offer, but at least this may get you started.

Does this help any?  Ron.

reply via email to

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