|
"ian johnston" <iano1213@gmail.com> wrote in message <i8tanv$73p$1@fred.mathworks.com>...
> hey guys,
>
> I have a matrix :
>
> Coordinates =
>
> 62.875 10 63.617 31
> 75.45 55 66.725 61
> 65.23 32 11.444 76
> 68.077 63 74.936 134
>
> I'd like to merge them as:
>
> Merged =
> 62.875 10 66.725 61
> 65.23 32 74.936 134
>
> That is, merge every 2 rows as follows: the first 2 values in the 1st row and the last 2
> values in the 2nd row.
>
> Some help would be appreciated?
>
> Ian
- - - - - - - -
M = [C(1:2:2*floor(end/2),1:2),C(2:2:2*floor(end/2),end-1:end)];
where C is the Coordinates array and M is Merged.
Roger Stafford
|