%% Short and Long Engineering Notation
% Display the difference between shortEng and longEng formats.
% Set the output format to shortEng.

format shortEng

%
% Create a variable and increase its value by a multiple of 10 each time through a for loop.

A = 5.123456789;
for k = 1:10
   disp(A)
   A = A*10;
end

% The values display with 4 digits after the decimal point and an exponent that is a multiple of 3.
%
% Set the output format to the long engineering format and view the same values.

format longEng

A = 5.123456789;
for k = 1:10
   disp(A)
   A = A*10;
end

% The values display with 15 digits and an exponent that is a multiple of 3.
% Copyright 2015 The MathWorks, Inc.