|
I think that this should solve your problem: N = 10; n = 5; standard_deviation = n / 10; % Generates a vector of N ones, then moltiply it to the scalar n nominal_values = n * ones(N, 1); % Generates a vector of N standard random normal realizations, then multiply them to the scalar (n/10) -> you get a centered random normal with std n/10 deviations = standard_deviation * randn(N, 1); % Get the final result result_array = nominal_values + deviations;I hope this will solve your problem, you are welcome to ask for a clarification if needed. (责任编辑:) |
