help-octave
[Top][All Lists]
Advanced

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

Re: re-interpreting Octave output


From: findtype
Subject: Re: re-interpreting Octave output
Date: Thu, 21 Apr 2011 15:37:49 -0400

More naively, a related question is this.  How do you select a part of the output for further use?  Is there a way to 
copy it to a clipboard?  The output from my octave (in cygwin), does not respond to mouse commands.  

Ted F.  

On Thu, Apr 21, 2011 at 2:32 PM, Przemek Klosowski <address@hidden> wrote:
On 04/21/2011 11:24 AM, Sergei Steshenko wrote:

- _no_ questions need to be asked about types of entities - because
Data::Dumper prints in _Perl_ format.

GNU Octave prints/dumps internal data in all kinds of formats which
are neither descriptive enough nor compatible with Octave itself.

Sergei has a point here---it is actually pretty useful to be able to cut and paste sections of the interpreter output to re-execute them. Octave makes it a little hard:

- interactive code is interspersed with prompts, which is annoying
 especially when trying to re-execute a multi-line segment of code,
 e.g. a loop, by cutting and pasting within a session.

- default data output is not formatted as a valid Octave input

For those reasons, I find that PS2("") is actually quite useful, to the point that I recommend it as a default. I'd even go as far as suggesting PS1(""), or at least PS1("# \\s:\\#>\n"), so that it doesn't get in the way of cutting and pasting.

Do other people agree that it is in general useful to be able to put the command and data outputs back into the interpreter, in the way Sergei's Data::Dumper example showed? The commands can be accomodated by manipulating PSx(), but data would need some assist from the interpreter, i.e. adding [] characters to printouts, like:

# octave:18> a=[1 2 3; 4 5 6]
a = [

  1   2   3
  4   5   6
]

and other, more complex things for cell arrays, structures, etc. Does it seem worth doing?
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave


reply via email to

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