How to configure the Octave terminal to display numbers without scientific notation?

I am trying to print a long table of numbers in an octave terminal.

disp(vec); 

What i get

 7.0931e-01 6.2041e-05 9.7740e-01 9.9989e-01 8.8428e-01 9.0524e-01 ... 

Such a numerical designation is a pain to be read. How can I set an octave terminal to output numbers usually like 0.7, 0.014, 0.95 ?

+5
source share
1 answer

You can use format short g to display each number in a more logical format.

 format short g disp(vec) % 0.70931 % 6.2041e-05 % 0.9774 % 0.99989 % 0.88428 % 0.90524 
+8
source

Source: https://habr.com/ru/post/1260461/


All Articles