NDpar package: Difference between revisions

Jump to navigation Jump to search
134 bytes added ,  8 March 2015
→‎Output in cell arrays: mention performance penalty
(→‎Introduction: Mention the performance penalty)
(→‎Output in cell arrays: mention performance penalty)
Line 45: Line 45:
=== Output in cell arrays ===
=== Output in cell arrays ===


The following sample code was an answer to [http://stackoverflow.com/questions/27422219/for-every-row-reshape-and-calculate-eigenvectors-in-a-vectorized-way this question]. The goal was to diagonalize 2x2 matrices contained as rows of a 2d array (each row of the array being a flattened 2x2 matrix).
The following sample code was an answer to [http://stackoverflow.com/questions/27422219/for-every-row-reshape-and-calculate-eigenvectors-in-a-vectorized-way this question]. The goal was to diagonalize matrices. For this example, 2x2 matrices contained as rows of a 2d array (each row of the array being a flattened 2x2 matrix). Note that in this case the function is too fast, so the performance penalty is too high to gain anything.


{{code|diagonalize NxN matrices contained in an array|
{{code|diagonalize NxN matrices contained in an array|
26

edits

Navigation menu