Code covered by the BSD License  

Be the first to rate this file! 7 Downloads (last 30 days) File Size: 1.7 KB File ID: #45651

Cumulative 2x2 Complex Matrix Multiplication

by

 

21 Feb 2014 (Updated )

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

| Watch this File

File Information
Description

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

Required Products MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Other requirements C++ Compiler.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Updates
25 Feb 2014

Update the example of function use to a correct one.

Contact us