Matrix array in a strange format

2 vues (au cours des 30 derniers jours)
Joe
Joe le 10 Août 2023
Commenté : John D'Errico le 10 Août 2023
Hello, how do I make this show in the usual row and columns, cell format?

Réponse acceptée

Adam
Adam le 10 Août 2023
It's a sparse array so that is standard.
You can use:
full( kio )
to convert to a full (standard) matrix if you wish, though be aware that it will take more memory. Obviously for a 78x78 matrix this is not an issue though.
  1 commentaire
John D'Errico
John D'Errico le 10 Août 2023
Adam is completely correct of course. I would only add the additional point that a sparse 78x78 matrix is REALLY small these days. Any computations will not be that much faster for such a small matrix. Sparse matrix computations might even be slower. It is worth testing for your matrix.

Connectez-vous pour commenter.

Plus de réponses (1)

Michael
Michael le 10 Août 2023
Your matrix "val" is a sparse matrix. You can convert it to a full storage matrix with the function "full".
A = full(val)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by