diff options
Diffstat (limited to 'sharedfiles/reverse.m')
-rw-r--r-- | sharedfiles/reverse.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sharedfiles/reverse.m b/sharedfiles/reverse.m new file mode 100644 index 0000000..010529b --- /dev/null +++ b/sharedfiles/reverse.m @@ -0,0 +1,5 @@ +% Reverses the positions of the elements of a vector
+
+function r=reverse(v);
+
+r=v([length(v):-1:1]);
\ No newline at end of file |