help-octave
[Top][All Lists]
Advanced

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

Re: How do I print and save tables?


From: Montgomery-Smith, Stephen
Subject: Re: How do I print and save tables?
Date: Sat, 13 Sep 2014 03:01:21 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0

On 09/12/2014 09:16 PM, Ron.Simonson wrote:
> 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

Once you have the data in this form, some spreadsheet programs will
allow you to import it.  I know openoffice can do it.  Probably Excel
can do it as well.

If you want to turn it into a latex file, I wouldn't use octave.  I
would use a program like perl to do it.  Octave definitely isn't an
ideal language for handling text.  On the other hand, learning perl
might be a bit of a steep learning curve, so if you ask nicely, someone
might provide a nice script for you.  (But if you are using Windows, you
will have to install perl, whereas it typically comes preinstalled with
Linux.)



reply via email to

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