Hello ,
i want to multiply an array H which is 2x2 cell array (each cell contains a 1x500 array) with an array X which is 2x1 array (also each cells contains 1x500 array) .When i try to multiply these arrays like this H.*X i get the following error: Undefinedoperator '.*' for input arguments of type 'cell'. How can i multiply these cell arrays?
Thank you.

 Akzeptierte Antwort

Matt J
Matt J am 6 Dez. 2019

0 Stimmen

for i=1:2
for j=1:2
H{i,j}=H{i,j}.*X{i};
end
end

1 Kommentar

Gn Gnk
Gn Gnk am 7 Dez. 2019
That's excactly what i was looking for .Thank you so much!!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

choonghyun lee
choonghyun lee am 7 Dez. 2020
Bearbeitet: Stephen23 am 7 Dez. 2020

0 Stimmen

M = cellfun(@(x,y) x.*y, H,X,'UniformOutput',false)

Kategorien

Mehr zu Operators and Elementary Operations finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 6 Dez. 2019

Kommentiert:

am 7 Dez. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by