% Alternative solution for pretty print vector
% using for loops.
% Minas Spetsakis, Oct. 2017

% Vi = rand(1,10);
N = length(Vi);

for i=1:N
    if i<N
        fprintf('%5.2f, ',Vi(i));
    else
        fprintf('%5.2f\n',Vi(i));
    end
end

