\ am dealing with a matrix in MATLAB which is sparse and has many rows and columns. In this case, the row and columns of the matrix are the ids for particular items. Let's assume them as id1 and id2.
It would be nice if the ids for rows and columns could be embedded so I can have access to them easily to them without the need for creating extra variables that keep the two ids.
The answer would be probably to use a table data type. Tables are very ideal answer for my need however I was wondering if I could create a table data type for a sparse matrix?
A [m*n] sparse matrix %% m & n are huge
id1 [1*m] , id2 [1*n] %% two vectors containing numeric ids for rows and column
Could we obtain?
T [m*n] sparse table matrix
Thanks for sharing your view with me.
sparsefunction: mathworks.com/help/matlab/ref/sparse.html?refresh=true - DMRsparse tableclass in Matlab. First reason is thattable()can have variables with more than one column, how would you define sparsity in that case (rethoric question)? What is the table specific functionality that you want to retain as opposed to a sparse() matrix? - Olegtable(sparse(rand(10,10)))as an example, makes the table non sparse which is not something I am looking for. - YasAis a huge matrix with many zeros entries. It is preferred to be in sparse form. 2. Rows and columns ofAhave unique ids, it would be nice if rows and columns of A have identifiers like how table data type does it in Matlab. - Yas