Is there an equivalent of the stack and unstack functions (for type dataset) that works for type double?

3 views (last 30 days)
Hi Matlab experts,
I'm new to Matlab. I'm usually an R user, but I'm moving up to the big leagues in terms of data size, so here I am at the Matlab help forum. I have a giant sparse predictor matrix (200 million cells) that I am trying to convert to the proper format for regression. To perform any operations on this matrix in a reasonable amount of time it's necessary to exploit its sparsity by declaring it sparse with code like data=sparse(data). The functions 'stack' and 'unstack' in the statistics package do exactly the reformatting I need. But to use them, I need to convert my 'sparse matrix' into a 'dataset', which is no longer treated as sparse. So 'stack' and 'unstack' take way too long. Are there equivalent functions that I can feed a sparse matrix into as input? Or is there a way to get Matlab to treat a dataset as sparse?
Thanks a lot for any help,
Zach

Answers (0)

Categories

Find more on Cell Arrays in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!