Vectorize a “shrinking” scalar product in MATLAB
Say I am given a row vector psi
of length P
and a row vector q
of length M
in MATLAB. Here, M>P
. I want to assemble G
in the following way:
Say I am given a row vector psi
of length P
and a row vector q
of length M
in MATLAB. Here, M>P
. I want to assemble G
in the following way: