%% Large Data Range Format
% Use the shortG format when some of the values in an array are short numbers and some have large exponents. The shortG format picks whichever short fixed-decimal format or short scientific notation has the most compact display.
% Create a variable and display output in the short format, which is the default.

x = [25 56.31156 255.52675 9876899999];
format short
x

%
% Set the format to shortG and redisplay the values.

format shortG
x

% Copyright 2012 The MathWorks, Inc.