%\| Summer Semester 2014
%\| AudioLabs Lab Course
%===============================
%\| MODULE: Speech enhancement 
%\| Prof. Dr.-Ing Emanuel Habets
%\| Module supervsors: 
%\|     - Soumitro Chakrabarty
%\|     - Maja Taseska
%===============================
%\| Author:
%\|     - Maja Taseska
%\|     - Affan Hasan Khan
%===============================
%===============================

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%=============FUNCTION DESCRIPTION====================

% Input parameters
%-----------------
%\| "arrayCenter" ... vector [3x1] containing the coordinates of the array
%center
%\| "sourcePos"... vector [3x1] containing the position of the source of
%interest
%\| "numMics" ... number of microphones
%\| "micDist" ... the distance between neighboring microphones
%\| "freqvec" ... vector containing the frequencies at which the steering
%vector should be computed

% Output parameters
%-------------------
%\| "steerVec" ... a matrix [numMics x length(freqvec)], where each column
%of the matrix contains the steering vector at a particular frequency

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


function steerVec = fcn_compute_steerVec_linArray(arrayCenter,sourcePos,numMics,micDist,freqvec)

%==========================================
% PLEASE DO NOT MODIFY
%==========================================

speedSound = 343; % meters per second

% Memory allocation
steerVec = zeros(numMics,length(freqvec));
%__________________________________________


%==========================================
% FILL IN THE BLANKS
%==========================================
% Direction-of-arrival of the source with respect to the array center

% write your code here

sourceAngle = 
%_________________________________________



% For each frequency in freqvec, the steering vector needs to be computed

for fidx = 1:length(freqvec)
    
    %====================================
    % FILL IN THE BLANKS
    %====================================

    % Write your code here
    
    % Store the value
    steerVec(:,fidx) = 
    
    %____________________________________
end
