⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calculate_av_mvdr.m

📁 implement basic routines in Matlab and Octave (currently using Matlab R13) for simulating adaptive b
💻 M
字号:
function [w_av, mu, g] = calculate_av_mvdr(numIterations, s, R)

if(size(R,1) ~= size(R,2))
    error('ERROR - Covariance matrix must be square')
end
if(size(s,1) ~= size(R,1))
    error('ERROR - length of steering vector must be same as covariance matrix')
end

N = size(R,1);
w_av = zeros(N, numIterations);

w_av(:,1) = s/(norm(s)^2);
tempResult = (eye(N)-((s*s')/(norm(s)^2))) * R;
nfft = 1024;

[dummy, look_direction_index] = max(fftshift(abs(fft(s,nfft)).^2));
look_direction_range = (look_direction_index-100):1:(look_direction_index+100);
%restore_vector = 0;
for i = 2:numIterations
   g_local = tempResult * w_av(:,i-1);
   g(:,i-1) = g_local;
   %mu_local = real((g' * R * w_av(:, i-1)) / (g' * R * g));
   mu_local = ((g_local' * R * w_av(:, i-1)) / (g_local' * R * g_local));
   mu(i-1) = ((g_local' * R * w_av(:, i-1)) / (g_local' * R * g_local));
   [dummy, max_gain_index] = max(fftshift(abs(fft(mu_local*g_local,nfft)).^2));
   if sum(look_direction_range == max_gain_index) >= 1
%       restore_vector = restore_vector + mu_local*g;
   end
   w_av(:,i) = w_av(:,i-1) - mu_local*g_local;
end
%w_av(:,numIterations) = w_av(:,numIterations) + restore_vector;
%plot_array_response_and_interferers([gt(:,45:53)], strvcat('Auxiliart Vector'), Desired_AOA, interferer_aoa_deg, 1024);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -