% generate data set with noise
function [noise_fea] = addnoise(fea, per, cn)

if nargin ~= 3
    disp('addnoise(fea, per, cn)');
    return;
end

vsize = size(fea,1);
noise_fea = fea;
sk = size(fea,2)/cn;
n = sk*per;

for k = 1:cn
    for i = 1:n
        noise_fea(:, (k-1)*sk+i) = rand(vsize, 1);
    end
end