help-octave
[Top][All Lists]
Advanced

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

Re: Simultaneous "compact", "short e" and "output_precision(2)"


From: Paul
Subject: Re: Simultaneous "compact", "short e" and "output_precision(2)"
Date: Tue, 20 Aug 2013 14:14:51 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Mike Miller <mtmiller <at> ieee.org> writes:
>On Tue, Aug 20, 2013 at 01:45:01 +0000, Paul wrote:
>> I have the following script.  I want format to be compact, to use
>> short scientific exponent, and to have a precision of 1 decimal
>> place.  The following is compact, but uses fixed point for u.
> 
> Try setting compact after short e:
> 
>   format short e
>   format compact
>   output_precision (2)
> 
> I think this gives the format you want.
> 
>> Is this proper behaviour for format & output_precision?  Is it
>> possible to get short scientific exponent and output_precision?
> 
> Was there a problem with output_precision that I didn't get from
> your examples, or was it only how to combine compact with scientific
> notation?

If by combine you mean simultaneously having in effect compact format and 
short scientific notation, yes, that's what I was after.  The problem was 
that I couldn't get both *and* output_precision(2).  For some reason, the 
combinations I tried always had one or more of the above features someone 
turned off.

Which leads me to the question...why is the order in your code effective in 
achieving all 3 features while my 2nd example did not?  The only difference 
is that the format statements are interchanged.  So I'm wondering if the 
format statement has certain undocumented behaviours, such as "short e" 
resetting (meaning unsetting) "compact".



reply via email to

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