An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
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'
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