Input, x, is a list of numbers Output y is the list in reverse order Syntax reverse(list), for example reverse([606 51 23]) returns 23 51 606
0001 0002 % Input, x, is a list of numbers 0003 % Output y is the list in reverse order 0004 % Syntax reverse(list), for example 0005 % reverse([606 51 23]) returns 23 51 606 0006 0007 function [y]=reverse(x) 0008 0009 n=length(x); 0010 y=x(n:-1:1);