Lets assume we have a 3 dimensional matrix A
and X_IND = 4:8
and Y_IND = f(X_IND)
.
f
is a function like 2*x^2+1
. How I can extract following vector out of A
:
a = A(X_IND,Y_IND,3)
However, above equation in MATLAB leads to a matrix while the result should be an array since Y_IND
is function of X_IND
.