调整双数组-Matlab

时间:2019-07-19 16:47:28

标签: matlab

如何调整如下所示的边界双精度数组:

102     8
101     9
100     9
99      9
…       …

成为看起来像这样的双数组:

102   8   101   9   100   9   99   9 … …

代码:

I = imread('coins.png');
BW = im2bw(I, graythresh(I));
[B,L] = bwboundaries(BW,'noholes');
boundary = B{1}

1 个答案:

答案 0 :(得分:0)

% consider A is your matrix.
At=A.';
At(:)  % this matrix will give what you want.