# HG changeset patch # User Mike Miller # Date 1374812724 14400 # Node ID c8586e6fc60d05aeff76a9b012af19949f031824 # Parent bb3a1ec7cc4beb71fabab6078a312799cb51f45c interp1.m: Fix interpolation on ND-arrays (bug #35860) * interp1.m: Fix implicit indexing of the rows of ND-arrays when X vector is not specified. diff -r bb3a1ec7cc4b -r c8586e6fc60d scripts/general/interp1.m --- a/scripts/general/interp1.m Fri Jul 26 00:09:41 2013 -0400 +++ b/scripts/general/interp1.m Fri Jul 26 00:25:24 2013 -0400 @@ -149,7 +149,11 @@ if (isempty (xi) && firstnumeric && ! ispp) xi = y; y = x; - x = 1:numel (y); + if (isvector (y)) + x = 1:numel (y); + else + x = 1:rows (y); + endif endif ## reshape matrices for convenience