Efficiently computing the inner product of three arrays, two of which are MDA (multidimensional array)
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
My problem involves finding the inner product over a field of 91 x 361. Consider an array,g, which is an MDA, 91x361x4, and R is 4 x 4. I am trying to efficiently compute conj(g)*R*g (e.g. g^H*R*g at each point in the field) to produce a scalar at each and every point on the 91x361 field. Moreover,I subsequently need to find the maximum value of the resulting scalar field. I am currently using two loops (1:91 and 1:361), which is naturally very slow. I am trying to use matrix/vector multiplication to speed the process up, as I must perform this process for several hundred iterations.
1 Commento
James Tursa
il 11 Lug 2015
Are you open to mex solutions? This computation would be very easy to code up in a C mex routine (I could do it and post it) and would probably run a couple of orders magnitude faster than what you are currently doing. What are the complexities of the variables involved? Btw, your memory storage is lousy for what you are doing ... g should be 4x91x36 so that the 4-vector you are using to multiply by R is contiguous in memory.
Risposte (1)
Abhishek Pandey
il 15 Lug 2015
Hello Robert,
You might find this link useful. It talks about multiple multiplications between matrices, vectors, or scalars contained in two multidimensional arrays, with automatic virtual array expansion.
- Abhishek
0 Commenti
Vedere anche
Categorie
Scopri di più su Resizing and Reshaping Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!