home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 5
/
ctrom5b.zip
/
ctrom5b
/
WINDOWS
/
DIVERSEN
/
MATHS171
/
FLIPLR.M
< prev
next >
Wrap
Text File
|
1993-03-23
|
366b
|
19 lines
function y = fliplr(x,nc)
% y = fliplr(x,nc)
% fliplr(x) reverse the order of the argument columns
% fliplr(x,nc) reverse the order of the first nc columns
% S.Halevy 7/31/92
% Copyright (c) 1992 by the MathWizards
y=x;
[m,n] = size(y);
if nargin<2
nc=n;
else
nc = abs(nc);
end
nc=expr_sel(nc>n,n,nc);
y(:,nc:-1:1)=x(:,1:nc);