Skip to content
Snippets Groups Projects
Commit 5cf0bfbf authored by Achilles Kappis's avatar Achilles Kappis
Browse files

Fix error in SNR calculation in obsFiltTD.m

parent 3d14a716
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
% Author: Achilles Kappis % Author: Achilles Kappis
% e-mail: axilleaz@protonmail.com % e-mail: axilleaz@protonmail.com
% %
% Date: 04/10/2024 (DD/MM/YYYY) % Date: 05/10/2024 (DD/MM/YYYY)
% %
% Copyright: MIT % Copyright: MIT
% -------------------------------------------------- % --------------------------------------------------
...@@ -281,8 +281,9 @@ function [O, Rme, Rmm, Ovec, RmeMtx, RmmMtx, condNum, mMtx, Omean, RmeMean, RmmM ...@@ -281,8 +281,9 @@ function [O, Rme, Rmm, Ovec, RmeMtx, RmmMtx, condNum, mMtx, Omean, RmeMean, RmmM
for jIdx = size(RmmMtx, 3):-1:1 for jIdx = size(RmmMtx, 3):-1:1
snrMtx = 10^(-snrVal/10) * norm(RmmMtx(:, :, jIdx), 'fro')/(size(m, 2)^2); % Calculate the appropriate SNR amplitude values snrMtx = 10^(-snrVal/10); % Convert SNR to linear value
snrMtx = snrMtx * eye(size(RmmMtx, 1)); snrMtx = (snrMtx^2) * norm(RmmMtx(:, :, jIdx), 'fro')/(size(m, 2)^2); % Calculate the appropriate SNR amplitude values
snrMtx = snrMtx * eye(size(RmmMtx, 1)); % Make the matrix
Ovec(:, :, jIdx) = RmeMtx(:, :, jIdx).'/(RmmMtx(:, :, jIdx) + regMtx + snrMtx); Ovec(:, :, jIdx) = RmeMtx(:, :, jIdx).'/(RmmMtx(:, :, jIdx) + regMtx + snrMtx);
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment