F#: how to create matrix of elements of any other type except Double

Posted by Nike on Stack Overflow See other posts from Stack Overflow or by Nike
Published on 2010-03-25T17:40:36Z Indexed on 2010/03/25 17:43 UTC
Read the original article Hit count: 439

Filed under:
|
|

I'm a beginner in F#. I know that there is the way to create Double Matrix using PowerPack.dll:

let B = matrix [ [ 1.0; 7.0 ];
                 [ 1.0; 3.0 ] ]

How can I create matrix with elements of my own type (for example with [,] instead of Double), so it would look like:

let B = matrix [ [ [1,2]; [3,4] ];
                 [ [7,8]; [5,6] ] ]

© Stack Overflow or respective owner

Related posts about F#

Related posts about matrix