File Exchange

image thumbnail

Cumulative 2x2 Complex Matrix Multiplication

version 1.1 (1.7 KB) by

This takes a 2x2xm matrix and calculates the cumulative matrix multiplication along the 3rd diim.

1 Download

Updated

View License

This function calculates the cumulative matrix multiplication of input complex matrices A(2,2,m)
This function should be compiled using the Maltab Mex function.
m = 1000; % number of matrices
A = rand(2,2,m) + 1i * rand(2,2,m); % Example matrix;
B = cM(A); % B is a 2x2 matrix

This function is up to 180 times faster that the equivalent for loop.

B = eye(2);
for ii = 1 : 1000
   B = B * A(:,:,ii);
end

Comments and Ratings (0)

Updates

1.1

Update the example of function use to a correct one.

MATLAB Release
MATLAB 8.1 (R2013a)
Tags Add Tags

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video