Matrix array in a strange format

2 次查看(过去 30 天)
Hello, how do I make this show in the usual row and columns, cell format?

采纳的回答

Adam
Adam 2023-8-10
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 个评论
John D'Errico
John D'Errico 2023-8-10
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.

请先登录,再进行评论。

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by