%% Round Elements to Specified Number of Significant Digits
% Round the elements of a vector to retain 2 significant digits.

format shortg
x = [1253 1.345 120.44]
y = round(x,2,'significant')

% Copyright 2012 The MathWorks, Inc.