full

Creates a fully populated matrix from sparse.

Syntax

a = full(s)

Inputs

s
A sparse matrix to be converted.
Type: double | complex
Dimension: matrix

Outputs

a
The fully populated matrix.
Type: double | complex
Dimension: matrix

Example

row = [1, 2, 4, 4, 1, 5, 2, 3, 4, 1, 2, 3, 4, 1, 4];
col = [1, 1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6];
vals = [10, 20, 40, -90, 110, 150, 170, 180, 190, 210, -220, 230, 240, 260, 290];
s = sparse(row, col, vals);
a = full(s)
a = [Matrix] 5 x 6
10    0  110    0   210  260
20    0    0  170  -220    0
 0    0    0  180   230    0
40  -90    0  190   240  290
 0    0  150    0     0    0