fn_interleave
Contents
Syntax
y = fn_interleave(dim,x1,x2,...[,'push'])
Description
Similar syntax to Matlab function CAT, but interleaves the data. The 'push' flag results in having all dimensions more than dim 'pushed' rightward.
Example: a = reshape(1:6,2,3); b = reshape(11:16,2,3); fn_interleave(2,a,b)
ans =
1 11 3 13 5 15 2 12 4 14 6 16
fn_interleave(2,a,b,'push')
ans(:,:,1) =
1 11 2 12
ans(:,:,2) =
3 13 4 14
ans(:,:,3) =
5 15 6 16
Source
Thomas Deneux
Copyright 2012-2017