Hardamom product between two matrices with a for loop

2 ビュー (過去 30 日間)
Raisul Islam
Raisul Islam 2017 年 10 月 9 日
コメント済み: Christine Tobler 2017 年 10 月 9 日
I have two matrices X and V. X is a p by p matrix while v is a n by p matrix. I want a hardamom product between X and V while each element of v must be multiplied with each column of X / must go through each row and columns of X. The output HD matrix must be n by p. I tried the following for loop, but I end up having a p-p-n matrix. I want to plot n by p , and my n goes into the third dimension. I want a signal plot of n by p, not a p by p by n. The size should remain same. Also please suggest how will i do memory allocation as my n can be upto 5000 and p can be upto 40.
X=impulseimp;
v=residualmat;
[m,n]=size(X);
p=length(v);
%%Decomposition with a loop (resulting in a 3D matrix????)
% Now multiplication stage by steps
Y = zeros(m,n,p);
for i= 1:p
for j=1:n
Y(:,:,j) = X * v(i);
% Y(:,:,i) = X * v(i);
end
end
HD = Y;
Thank you in advance
  1 件のコメント
Christine Tobler
Christine Tobler 2017 年 10 月 9 日
Do you have some reference for the definition of a Hardamom product? Googling only turns up this question.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Decomposition についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by