Mercurial > forge
changeset 10916:1183c88c7509 octave-forge
imtranslate: deal with defaults nice
author | carandraug |
---|---|
date | Mon, 24 Sep 2012 13:50:08 +0000 |
parents | 60a4a975db8c |
children | b5791dfbfa92 |
files | main/image/inst/imtranslate.m |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/main/image/inst/imtranslate.m Mon Sep 24 13:47:59 2012 +0000 +++ b/main/image/inst/imtranslate.m Mon Sep 24 13:50:08 2012 +0000 @@ -14,7 +14,8 @@ ## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {@var{Y}} = imtranslate (@var{M}, @var{x}, @var{y} [, @var{bbox}]) +## @deftypefn {Function File} {@var{Y}} = imtranslate (@var{M}, @var{x}, @var{y}) +## @deftypefnx {Function File} {@var{Y}} = imtranslate (@var{M}, @var{x}, @var{y}, @var{bbox}) ## Translate a 2D image by (x,y) using Fourier interpolation. ## ## @var{M} is a matrix, and is translated to the right by @var{X} pixels @@ -24,12 +25,7 @@ ## ## @end deftypefn -function Y = imtranslate(X, a, b, bbox_in) - - bbox = "wrap"; - if ( nargin > 3 ) - bbox = bbox_in; - endif +function Y = imtranslate (X, a, b, bbox_in = "wrap") if ( strcmp(bbox, "crop")==1 )