Load the MAT-file, provided with the software, that contains yeast data. This MAT-file includes three variables: yeastvalues, a 614-by-7 matrix of gene expression data, genes, a cell array of 614 GenBank® accession numbers for labeling the rows in yeastvalues, and times, a 1-by-7 vector of time values for labeling the columns in yeastvalues.
Create variables to contain a subset of the data, specifically the first five rows and first four columns of the yeastvalues matrix, the genes cell array, and the times vector.
Create a DataMatrix object.
dmo =
0 9.5 11.5 13.5
SS DNA -0.131 1.699 -0.026 0.365
YAL003W 0.305 0.146 -0.129 -0.444
YAL012W 0.157 0.175 0.467 -0.379
YAL026C 0.246 0.796 0.384 0.981
YAL034C -0.235 0.487 -0.184 -0.669
Sort the rows in the ascending order based on Column 1.
dmo2 =
0 9.5 11.5 13.5
YAL034C -0.235 0.487 -0.184 -0.669
SS DNA -0.131 1.699 -0.026 0.365
YAL012W 0.157 0.175 0.467 -0.379
YAL026C 0.246 0.796 0.384 0.981
YAL003W 0.305 0.146 -0.129 -0.444
Sort the rows in the descending order based on Column 1.
dmo3 =
0 9.5 11.5 13.5
YAL003W 0.305 0.146 -0.129 -0.444
YAL026C 0.246 0.796 0.384 0.981
YAL012W 0.157 0.175 0.467 -0.379
SS DNA -0.131 1.699 -0.026 0.365
YAL034C -0.235 0.487 -0.184 -0.669
Return an index vector that links the old object to the new object.
dmoNew =
0 9.5 11.5 13.5
YAL003W 0.305 0.146 -0.129 -0.444
YAL026C 0.246 0.796 0.384 0.981
YAL012W 0.157 0.175 0.467 -0.379
SS DNA -0.131 1.699 -0.026 0.365
YAL034C -0.235 0.487 -0.184 -0.669
In other words, you can use the index vector to recreate the new object from the old object.
dmoNew2 =
0 9.5 11.5 13.5
YAL003W 0.305 0.146 -0.129 -0.444
YAL026C 0.246 0.796 0.384 0.981
YAL012W 0.157 0.175 0.467 -0.379
SS DNA -0.131 1.699 -0.026 0.365
YAL034C -0.235 0.487 -0.184 -0.669