<< shanwavf | FOSSEE_Signal_Processing_Toolbox | sigmoid_train >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > shiftdata

# shiftdata

Shifts data by rearranging dimensions

### Syntax

    [y,perm,nshifts]=shiftdata(x,dim)
    [y,perm,nshifts]=shiftdata(x)

### Parameters

x :

  A vector matrix or n-dimensional array

dim :

  The dimension to be shifted to the first column

### 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)
    [y,perm,nshifts] = shiftdata(x,2)

    //When dim is not specified:
    x=1:5
    [y,perm,nshifts] = shiftdata(x)

### See also

- permute
- unshiftdata — Inverts the effect of shiftdata

### Authors

- Ankur Mallick

Report an issue
<< shanwavf | FOSSEE_Signal_Processing_Toolbox | sigmoid_train >>