I am trying to understand what happens in MATLAB for this certain line of code
good_mintratio=handles.mintratio(handles.good)
handles.good is an array with size (48x60) where all the elements are 1. handles.mintratio is also an array with size (48x60) where it contains floats.
I ran the following simple code to understand what it exactly does but I am not quite sure what is really happening. For this piece of code,
A = [1,2,3; 4,5,6];
B = [1,1,1; 1,1,1];
C=A(B);
This returns C = [1,1,1;1,1,1]
It seems like C is like B but contains the elements of A where the elements of B is the indexes for A.
A = [1,2,3; 4,5,6];
B = [2,1,1; 1,5,1];
C=A(B);
Like, this will make C = [4,1,1;1,3,1]
But good_mintratio=handles.mintratio(handles.good) this forms a colmun with size (2880,1). It seems like all the elements got combined in to a single colmun but not sure why the size changed. Also, if handles.good has some 0's (which means false in MATLAB, right?), would that change the result?