Hi Miguel,
I understand that you can perform the required processing steps when “Reference_SignalCut” is a 1D vector. Now that this is a 2D matrix, you wish to perform the same steps on all the columns of this matrix.
You can use a for loop in MATLAB, to traverse on all the columns of the “Reference_SignalCut” matrix and fetch them using simple indexing. After getting the column you can continue using the same processing steps.
Here is an example code for fetching columns of “Reference_SignalCut”:
% Generating example Reference Signal matrix of specified size
Reference_SignalCut = rand(23979, 400);
sz = size(Reference_SignalCut);
% Iterating over the columns of Reference Signal matrix
for i = 1:sz(2)
% ith column of the matrix
signal_col = Reference_SignalCut(:, i);
% Perform the required computations on the column
[afmag,delay] = ambgfun(signal_col,fs,1e6,'Cut','Doppler');
afmag = afmag*1; % Select plot gain *1
afmag(afmag>1 )= 1;
end
I have assumed that you already have the necessary matrix, so the above code shows one way to traverse on the columns of a randomly generated 2D matrix.
For more information about “for loops”, please refer to the following documentation:
Hope this information helps!
Best Regards,
Moksh Aggarwal