function [y] = mkshort(x)

% truncates an array of arbitrary size
% to 3 significant figures in decimal
% or exponential notation, whichever
% is shorter; (c) 2008 Anna Kelbert

n=size(x); n1=n;
for k=1:length(n)
    n1 = prod(n1);
end
x = reshape(x,1,n1);
y = x;
for k=1:n1
    temp = num2str(x(k), '%10.3g');
    y(k) = str2double(temp);
end
y = reshape(y,n);
