For Programmers: Free Programming Magazines  


Home > Archive > Matlab > January 2008 > sparse matrix









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author sparse matrix
Bobba Marco

2008-01-31, 10:18 am

Hello, is possible to create a sparse matrix type CELL?

I need to insert some strings in a matrix with many many
zeros empty cell.

Thanks
John D'Errico

2008-01-31, 10:19 am

"Bobba Marco" <bobbaNO@mfn.SPAM.unipmn.it> wrote in message
<fnseh9$b3$1@fred.mathworks.com>...
> Hello, is possible to create a sparse matrix type CELL?


No. It is not possible in matlab.

> I need to insert some strings in a matrix with many many
> zeros empty cell.


However, you can solve this problem simply
enough.

1. Store your elements in a simple linear cell array,
one after the other.

2. Create a sparse matrix of indexes into the linear
index of your cell array.

HTH,
John


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com