In this code:
hdrMat(ctr,:) = [double(frameCtr) double(numBins) binLength Fs Fc RangeOffset];
FrameMat(:,ctr) = data;
What is the meaning of (ctr,:)
and (:,ctr)
in terms of vectors?
In this code:
hdrMat(ctr,:) = [double(frameCtr) double(numBins) binLength Fs Fc RangeOffset];
FrameMat(:,ctr) = data;
What is the meaning of (ctr,:)
and (:,ctr)
in terms of vectors?
The (ctr,:) means you are addressing the ctr'th row, starting from the first row as row nr. 1. The ":" states, that you are addressing the whole row and not just an element. The (:,ctr) means you are addressing the ctr'th column and again " : " tells matlab to address the entire column.
Example:
A = [1 2 3; 4 5 6; 7 8 9];
A(2,:) = [0 1 0]
%Output
[1 2 3]
A = [0 1 0]
[7 8 9]
You can also apply the colon operator " : " to address a certain range of the row/column by writing:
A(2:3,1)
%Output
[0; 7];
Id strongly recommend you looking into the basic matlab questions on StackOverflow and also on the MatLab official documentation, where lots of examples are given.
Cheers, Pablo