Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I notice the values I get from octave are rounded to 5 decimal places. How can I increase that to 6 or 8 for example?

share|improve this question
3  
At the octave command prompt, type format long –  William DeMeo Mar 14 '12 at 4:15
8  
Googling "octave precision digits" yielded this as the 7th hit, and the one in which the brief "blurb" in Google page suggested a match. I know absolutely nothing about octave, so I can't vouch for the answer, but it does lead me to wonder... did you try googling? –  Arturo Magidin Mar 14 '12 at 4:15
add comment

1 Answer 1

up vote 6 down vote accepted

As noted by William DeMeo in the comments, the command format is what you're looking for. In fact, format is common to both Matlab and Octave.

The command is

format options where options are: short for 3 significant figures, long for 15 significant figures, long e (or E) and short e (or E) for using scientific notation ...

More is in manual here link

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.