<< shanwavf FOSSEE Signal Processing Toolbox sigmoid_train >>

FOSSEE Signal Processing Toolbox >> FOSSEE Signal Processing Toolbox > shiftdata

shiftdata

Shifts data by rearranging dimensions

Calling Sequence

Parameters

Description

[y,perm,nshifts]=shiftdata(x,dim) Shifts the entries along dimension dim in x to the first column and returns the permutation vector in perm [y,perm,nshifts]=shiftdata(x) Shifts the entries along dimension dim in x to the first column and returns the number of shifts in nshifts

Examples

//When dim is specified:
x=testmatrix('magi',3)
x  =

8.    1.    6.
3.    5.    7.
4.    9.    2.
[y,perm,nshifts] = shiftdata(x,2)
nshifts  =

[]
perm  =

2.    1.
y  =

8.    3.    4.
1.    5.    9.
6.    7.    2.
//When dim is not specified:
x=1:5
x  =

1.    2.    3.    4.    5.
[y,perm,nshifts] = shiftdata(x)
nshifts  =

1.
perm  =

[]
y  =

1.
2.
3.
4.
5.

See also


Report an issue
<< shanwavf FOSSEE Signal Processing Toolbox sigmoid_train >>