Tuesday 15 February 2011

matrix - Trimming MATLAB Array Keeping Columns -


I have a matrix that looks like this (10 x 8) and I have a "variable line-length" but the same #columns like my current metrics have been shown first:

  no nn nor nn nor nn nor nn nor nn nor nn nor nn 1.0000 na nn nor nn nor nn nor nn 0.9856 nn na NN NaN NaN NaN 1.0000 0.9960 NaN NaN NaN NaN 1.0000 NaN NaN NaN 1.0721 NaN 1.1523 0.8877 NaN NaN 1.0000 0.9977 1.6777 1.700 1.700 1.700 1.700 0.9944 0.9958 1.0712 1.0369 1.0000 1.0000 1.2027 0.9717 0.9995 0.9705 1.0691 0.8943 0.9724 0.8863 1.2083 1.0168 .9908 0.9406 1.0460 0.8647 0.9483 0.9064 1.2035   

And I need this so that I can plot uneven columns starting from the common point, which is == 1.0000 the last array looks like this So that each new column starts with 1.0000, and every 1.0000 column directly follows the values ​​given below:

  1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9717 1.0721 0.9958 1.2324 0.9856 0.9724 0.8863 1.3116 1.0168 1.0617 0.9705 1.1523 0.9960 0.9483 0.9064 1.2027 0.9 9 44 0.9406 0.9677 0.9517 1.2083 0.9995 1.0712 0.8877 1.2035 0.9908 1.0691 1.0006 1.0460 1.0369 0.8943 0.86 47 

You can move NaN under your matrix, which I a :

 < Code> B = NaN (size (A)); Idx = ~ asma (a); B (flip (idx)) = A (idx); Just plot conspiracy (b)    

No comments:

Post a Comment