I have a matrix that looks like this (10 x 8) and I need to reshape to a "variable row-length" but same # of columns such as the following showing my current matrix first:
NaN NaN NaN NaN NaN NaN NaN NaN
NaN NaN NaN NaN 1.0000 NaN NaN NaN
NaN NaN NaN NaN 0.9856 NaN NaN NaN
NaN NaN NaN 1.0000 0.9960 NaN NaN NaN
NaN 1.0000 NaN 1.2324 0.9517 NaN NaN NaN
NaN 1.0721 NaN 1.1523 0.8877 NaN NaN 1.0000
NaN 1.0617 1.0000 0.9677 1.0006 NaN NaN 1.3116
1.0000 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 0.9908 0.9406 1.0460 0.8647 0.9483 0.9064 1.2035
and I need it to be trimmed so that I can plot the uneven columns beginning at the common point, which == 1.0000. Final array looks like this so that each new column begins with 1.0000 and has the values following each 1.0000 directly below in columns:
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.9944 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.8647
NaN
, so your matrix could work as-is...How are you trying to plot it? – Rody Oldenhuis