11 lines
332 B
Matlab
Executable File
11 lines
332 B
Matlab
Executable File
function noise = get_noise(noise_sigma, N, M, type)
|
|
if nargin < 4
|
|
type = "complex";
|
|
end
|
|
|
|
if type == "complex"
|
|
noise = random('Normal', 0, noise_sigma / sqrt(2), N, M) + 1j * random('Normal', 0, noise_sigma / sqrt(2), N, M);
|
|
else
|
|
noise = random('Normal', 0, noise_sigma, N, M);
|
|
end
|
|
end |