Creating a Sparse Matrix

2 次查看(过去 30 天)
Ahmad Hasnain
Ahmad Hasnain 2019-2-26
I have a big matrix B and I get it by concatenating the small matrices.
B = [A1 M1 M2 Z1
M1' M2' Z2 A2];
But when I store this matrix, its size is very big and it takes up a lot of memory. I want to convert it to sparse matrix. The matrices Z1 and Z2 have all zero elements and, M1 and M2 also have a lot of zeros.
  5 个评论
Jos (10584)
Jos (10584) 2019-2-26
What do you want to do with B? In other words, do you really need to create it?
Ahmad Hasnain
Ahmad Hasnain 2019-2-26
I use B in a quadratic equation. I need to multiply it with some vectors.

请先登录,再进行评论。

回答(0 个)

类别

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