Multiplication of High Dimensional Matrices
Hello everyone!
I have a 4-D matrix and a 2-D matrix. I want to multiply the two and form a new 6-D matrix. Please see the following example.
corr_tauk=1:4;
corr_taun=1:4;
corr_tauc=1:4;
corr_g=1:4;
periods=2500;
vnodes_e=2000;
RtnDtr_e=randn(periods,vnodes_e);
r_itr=ones(length(corr_tauk),length(corr_taun),length(corr_tauc),length(corr_g));
Mtx_ridio=zeros(length(corr_tauk),length(corr_taun),length(corr_tauc),length(corr_g),periods,vnodes_e);
Now I confront a big problem to get Mtx_ridio. The idea is pointwise-multiplication to form an even higher dimensional matrix to reflect the cross-section at each period with each mix of parameters.
It seems like Mtx_ridio=r_itr.*RtnDtr_e, but definitely not.
Does anyone have an easy solution?Hello everyone!
I have a 4-D matrix and a 2-D matrix. I want to multiply the two and form a new 6-D matrix. Please see the following example.
corr_tauk=1:4;
corr_taun=1:4;
corr_tauc=1:4;
corr_g=1:4;
periods=2500;
vnodes_e=2000;
RtnDtr_e=randn(periods,vnodes_e);
r_itr=ones(length(corr_tauk),length(corr_taun),length(corr_tauc),length(corr_g));
Mtx_ridio=zeros(length(corr_tauk),length(corr_taun),length(corr_tauc),length(corr_g),periods,vnodes_e);
Now I confront a big problem to get Mtx_ridio. The idea is pointwise-multiplication to form an even higher dimensional matrix to reflect the cross-section at each period with each mix of parameters.
It seems like Mtx_ridio=r_itr.*RtnDtr_e, but definitely not.
Does anyone have an easy solution? Hello everyone!
I have a 4-D matrix and a 2-D matrix. I want to multiply the two and form a new 6-D matrix. Please see the following example.
corr_tauk=1:4;
corr_taun=1:4;
corr_tauc=1:4;
corr_g=1:4;
periods=2500;
vnodes_e=2000;
RtnDtr_e=randn(periods,vnodes_e);
r_itr=ones(length(corr_tauk),length(corr_taun),length(corr_tauc),length(corr_g));
Mtx_ridio=zeros(length(corr_tauk),length(corr_taun),length(corr_tauc),length(corr_g),periods,vnodes_e);
Now I confront a big problem to get Mtx_ridio. The idea is pointwise-multiplication to form an even higher dimensional matrix to reflect the cross-section at each period with each mix of parameters.
It seems like Mtx_ridio=r_itr.*RtnDtr_e, but definitely not.
Does anyone have an easy solution? multiplication of matrices MATLAB Answers — New Questions