Sparse Matrix in Altair Compose

User: "rodolfobibiano"
New Altair Community Member
Updated by rodolfobibiano

I need to store a big amout of data in a matrix but can't find how to use sparse matrix in altair compose. Is there any specific funcion? In matlab I would use 'spalloc'

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "L Moretti"
    New Altair Community Member
    Updated by L Moretti

    Hi Rodolfo,

     

    You can use the function sparse.

     

    For example if you have a full matrix you can convert it in this way:

     

    sparse(eye(6))

     

    Or you can create a sparse matrix specifying the row & col index and the related value. For example:

     

    m = [1 4 10];

    n = [ 2 6 8];

    val = [1 3 8];

    Matrix = sparse(m,n,val)

     

    Hope it helps,

     

    Lorenzo

    User: "rodolfobibiano"
    New Altair Community Member
    OP
    Updated by rodolfobibiano

    Should I install some type of extension in altair compose to make it work?

    <?xml version="1.0" encoding="UTF-8"?>sparse.PNG

    User: "L Moretti"
    New Altair Community Member
    Updated by L Moretti

    Hi Rodolfo,

     

    you should use Compose 2019.3!

     

     

    Lorenzo