|
|
See other catalogues for The MathWorks
You may also be interested in
Text version of the page
| | | | | | | | | | | | | | | | | | | | | | | mxSetJc (C and Fortran) | | | | | | | | | | Sparrow(2,1) = 1; Sparrow(5,1) = 1; Sparrow(3,2) = 1; Sparrow(2,3) = 2; Sparrow(5,3) = 1; Sparrow(6,3) = 1; Sparrow = sparse(Sparrow); | | | | | | | | | | The contents of the ir, jc,and pr arrays are listed in this table. | | | | | | | | | | | | | | | | | | | | Subscript | ir | | | Comment | | | | (2,1) | 1 | 1 | 0 | Column 1 contains two nonzero elements, with rows designated by ir[0] and ir[1] | | | | (5,1) | 4 | 1 | 2 | Column 2 contains one nonzero element, with row designated by ir[2] | | | | (3,2) | 2 | 1 | 3 | Column 3 contains three nonzero elements, with rows designated by ir[3],ir[4], and ir[5] | | | | (2,3) | 1 | 2 | 6 | There are six nonzero elements in all. | | | | (5,3) | 4 | 1 | | | | | | (6,3) | 5 | 1 | | | | | | | | | | | | | | | | | | | | | | As an example of a much sparser mxArray,considera 1000-by-8 sparse mxArray named Spacious containing only three nonzero elements. The ir, pr,andjc arrays contain the values listed in this table. | | | | | | | | | | | | | | | | | | | | Subscript | ir | | | Comment | | | | (73,2) | 72 | 1 | 0 | Column 1 contains no nonzero elements. | | | | | | | | | | | | | | | | | | | | 2-233 | | | | | | | | | | | | | | | | | | | | | | |
|