You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
396 B
14 lines
396 B
3 years ago
|
%--------------------------
|
||
|
% @Author: Jingqiao Hu
|
||
|
% @Date: 2020-11-21 19:09:22
|
||
|
% @LastEditTime: 2020-11-21 19:09:22
|
||
|
%--------------------------
|
||
|
|
||
|
% (2,2,m)*(2,2,m) => (4,m)*(4,m)
|
||
|
function z = matrix_3d_multiply(x, y)
|
||
|
% 4*m
|
||
|
z = [x(1,:).*y(1,:)+x(3,:).*y(2,:);
|
||
|
x(2,:).*y(1,:)+x(4,:).*y(2,:);
|
||
|
x(1,:).*y(3,:)+x(3,:).*y(4,:);
|
||
|
x(2,:).*y(3,:)+x(4,:).*y(4,:)];
|
||
|
end
|