How do I write a sparse matrix in MATLAB

3 次查看(过去 30 天)
  2 个评论
Shlesha Van
Shlesha Van 2020-12-15
That gives solutions on how to convert a full matrix into sparse. My case is opposite. I want to convert a sparse into full

请先登录,再进行评论。

回答(2 个)

Daniel Pollard
Daniel Pollard 2020-12-15
编辑:Daniel Pollard 2020-12-15
https://uk.mathworks.com/help/matlab/ref/full.html
  4 个评论
Jan
Jan 2020-12-16
The first two inputs of sparse() are the size of the matrix. As the error message tells you, [2,-1,0] cannot be a valid size. See the documentation of sparse :
doc sparse

请先登录,再进行评论。


Jan
Jan 2020-12-15
You want to convert a sparse matrix into a full one? Then use the command: full().

类别

Help CenterFile Exchange 中查找有关 Sparse Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by