gb119 Posted August 20, 2012 Report Share Posted August 20, 2012 Having skipped several generations of LabVIEW (from 8.6.1 to 2012) I was just looking around at the new toys to play with and cam across the matrix data type. Is there a good summary out there somewhere that would explain why having a new data type is so much better than simply using a 2D array of numbers - I see that there is a toolkit that links to the Intel Math Kernel library that uses the data type, but if I'm not using that is there any good reason to convert code to use the matrix type (e.g. more efficient data storage, faster indexing...?). I didn't find the online help particularly illuminating on the subject, but perhaps was looking in the wrong place... Quote Link to comment
Darin Posted August 21, 2012 Report Share Posted August 21, 2012 My favorite thing about the matrix functions is actually the Matrix Size function which works for all 2D arrays. Other than that, they are nice when you want matrix multiplication as opposed to element by element. Added bonus is that matrix multiplication uses an algorithm like Strassen's which is O(n^log2(7)) as opposed to the simple O(n^3) version most of us would write. Now it would be nice if we could have integer typed matrices.... Quote Link to comment
Djed Posted August 21, 2012 Report Share Posted August 21, 2012 Generally there is little difference between the matrix data type and a 2D array. However, there are a handful of mathematical operations that act differently. Just multiplying 2D arrays of numbers the way labview does is different than matrix multiply. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.