diff options
author | shamikam | 2017-11-07 15:59:48 +0530 |
---|---|---|
committer | shamikam | 2017-11-07 15:59:48 +0530 |
commit | c0c0582462720ed597b00e116506570577614e89 (patch) | |
tree | 31dedd23698e5357b19c810b7d7a8464100ef44a /macros/wrev.sci | |
download | FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.tar.gz FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.tar.bz2 FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.zip |
initial commit
Diffstat (limited to 'macros/wrev.sci')
-rw-r--r-- | macros/wrev.sci | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/macros/wrev.sci b/macros/wrev.sci new file mode 100644 index 0000000..a01ed77 --- /dev/null +++ b/macros/wrev.sci @@ -0,0 +1,23 @@ +function [y]= wrev(x) + +// Reverses order of elements of input vector +// Calling Sequence +// [y]=wrev(x) +// Parameters +// x: Input vector of string, real or complex values +// Description +// This is an Octave function. +// This function reverses the order of elements of the input vector x. +// Examples +// 1. wrev([1 2 3]) +// ans= 3 2 1 +// 2. wrev(['a','b','c']) +// ans= cba + +funcprot(0); +rhs=argn(2); +if (rhs~=1) then + error("Wrong number of input arguments.") +else y=callOctave("wrev",x) +end +endfunction |