how to convert a compact form of a matrix into matrix form

3 3
2 1 3 2 3
1 0 2
1 2 6


first line shows row and column number
first index of the second line tells the number of non-zero entries of the first row and second index tell the column number where the non zero entry is placed

for 1st row of matrix:

non-zero entries=2
column number=1
non-zero entry=3
column number=2
non-zero entry=2

covert this in the given form
0 3 3
2 0 0
0 0 6
You explain how to do it in your description. What really is the problem?
Topic archived. No new replies allowed.