BIRDy/Benchmark/Robot_Data_Generation/Experiment_Data_Generation/noisyMeasurement.m

11 lines
277 B
Mathematica
Raw Permalink Normal View History

2021-04-29 09:42:38 +00:00
function noisyState = noisyMeasurement(State, sd)
% Authors: Quentin Leboutet, Julien Roux, Alexandre Janot and Gordon Cheng
%
% This function adds Gaussian noise with a standard deviation sd to the measured quantity.
noisyState = State + diag(sd)*randn(size(State));
end