Functions | |
if (nargs > 0 &&numel(varargin{1})==1 &&isfigure(varargin{1})) cf | |
varargin (1) | |
endif | if (nargs==0) retval |
elseif (nargin==1) orientation | |
if (strcmpi(orientation,"landscape")||strcmpi(orientation,"portrait")) set(cf | |
orientation else | error ("orient: unknown orientation") |
endif else | print_usage () |
endif endfunction!shared | !set (gcf(),"visible","off")%!assert(orient |
endif endfunction!shared portrait!test | orient ('landscape')%!assert(orient |
endif endfunction!shared portrait!test landscape!test | orient ('portrait')%!assert(orient |
endif endfunction!shared portrait!test landscape!test portrait | !fail ("orient('nobody')","unknown orientation")%!assert(orient |
Variables | |
function | retval |
else | cf = gcf () |
paperorientation = "portrait" |
endif endfunction !shared portrait !test landscape !test portrait !fail | ( | "orient('nobody')" | , | |
"unknown orientation" | ||||
) |
endif endfunction !shared !set | ( | gcf() | , | |
"visible" | , | |||
"off" | ||||
) |
elseif | ( | nargin | = =1 |
) |
orientation else error | ( | "orient: unknown orientation" | ) |
if | ( | strcmpi(orientation,"landscape")||strcmpi(orientation,"portrait") | ) |
if | ( | nargs | , | |
0 && | numelvarargin{1} = =1 &&isfigure(varargin{1}) | |||
) |
endif endfunction !shared portrait !test landscape !test orient | ( | 'portrait' | ) |
endif endfunction !shared portrait !test orient | ( | 'landscape' | ) |
varargin | ( | 1 | ) |
else paperorientation = "portrait" |