Add basic code
This commit is contained in:
Executable
+11
@@ -0,0 +1,11 @@
|
||||
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
|
||||
Reference in New Issue
Block a user