Add basic code

This commit is contained in:
Ksyer
2024-07-16 15:55:00 +08:00
parent e98983b374
commit 1c009370a5
6 changed files with 121 additions and 19 deletions
+11
View File
@@ -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