Algorithm 1 The MATLAB code to generate noise for measurements |
1: error_level = 0.04; % assumed 4% measurement error level 2: sigma_vector = error_level * measurements; % measurements—columnar vector with measurements % adding 4% error to the measurement values; sigma_vector—columnar vector of standard deviations 3: measurements = measurements + sigma_vector.* randn (length(measurements),1) |