假设我有'1 2 3'
。我想得到'3 2 1'
。我怎样才能在Matlab中获得它?
更详细的例子
N=64;
[x y]=meshgrid(linspace(-3*pi,3*pi,N),linspace(-3*pi,3*pi,N));
t=sqrt(x.^2+y.^2);
% Now instead of "f=t+2*sinc(t);", I want to get all elements inverted aka
% first element becomes the last and so on -- I thought it would be
% sinc(abs(length(t)-t)) but it is not.