"AndNor" <
akla...@gmail.com> wrote in message
news:nb6vs3$s1p$1...@newscl01ah.mathworks.com...
The message at the top of the documentation page for INTERP1 deals with
three very specific usages. In general, I think many users shouldn't be
affected by those changes.
Getting back to the error you received, please show your exact INTERP1 call
and indicate the sizes of the input arguments you pass into it. My guess is
that the first input argument you provide to INTERP1 is empty or has only
one element, like this:
>> interp1(1, 2, 1.5)
Error using griddedInterpolant
Interpolation requires at least two sample points in each dimension.
Compare this with:
>> interp1([1 3], [2 6], 1.5) % Interpolate the value at x = 1.5 of the data
>> with points (1, 2) and (3, 6)
ans =
3
Interpolating a data set with 0 or 1 points is not possible. (There's no
"interior" region in which to interpolate; in the second example that
"interior" region was the interval between x = 1 and x = 3.) Theoretically
you could TRY extrapolating from a data set with 1 point, but in my opinion
that's going to be of dubious value at best and INTERP1 doesn't let you do
that. Mark Twain showed how dubious that sort of extrapolation can be.
"In the space of one hundred and seventy-six years the Lower Mississippi has
shortened itself two hundred and forty-two miles. That is an average of a
trifle over one mile and a third per year. Therefore, any calm person, who
is not blind or idiotic, can see that in the Old Oolitic Silurian Period,
just a million years ago next November, the Lower Mississippi River was
upwards of one million three hundred thousand miles long, and stuck out over
the Gulf of Mexico like a fishing-rod. And by the same token any person can
see that seven hundred and forty-two years from now the Lower Mississippi
will be only a mile and three-quarters long, and Cairo and New Orleans will
have joined their streets together, and be plodding comfortably along under
a single mayor and a mutual board of aldermen. There is something
fascinating about science. One gets such wholesale returns of conjecture out
of such a trifling investment of fact.
- Life on the Mississippi"
--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com