I have a complex matrix, I have to create its sparse form using sparse function. How do I store it in lesser bytes than the original complex matrix? In the first case it is storing in 144 bytes but in the sparse case it is storing in 152 bytes. Any example
A =
0.1620 + 0.8048i 0.3402 + 0.7727i 0.0000 + 0.0000i 0.2497 + 0.1178i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.3937 + 0.6184i 0.4527 + 0.2691i 0.0000 + 0.0000i
>> B = sparse(A)
B =
(1,1) 0.1620 + 0.8048i (2,1) 0.2497 + 0.1178i (3,1) 0.3937 + 0.6184i (1,2) 0.3402 + 0.7727i (3,2) 0.4527 + 0.2691i
>> whos Name Size Bytes Class Attributes
A 3x3 144 double complex B 3x3 152 double sparse, complex
Best Answer