"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message
news:k5bpkl$qvc$1@newscl01ah.mathworks.com...
> "Matt J" wrote in message <k5bogv$nch$1@newscl01ah.mathworks.com>...
>
>>
>> Then the solution would be to re-implement INTERP1 without
>> multi-threading, so that the development timeline is shorter.
>
> New development should progress to cope with hardware' changes.
>
>> Or, alternatively, to set a longer development timeline and release
>> interp1 only when it supports all the old I/O options.
>
> Hah, that's a (big buck) problem, and might be you are pointing the finger
> to the real problem. Timeline has stronger priority than compatibility for
> few sale managers out there.
While the timeline is and IMO should be a consideration in the development
process (see: Duke Nukem Forever, the term 'vaporware', the 'project
triangle') in my experience here at MathWorks it's not the only one.
> How do you understand when Steve said that interp1() is no longer
> maintained and not recommended ? I interpret it as they won't any effort
> on this old piece of code to save money.
Stop.
Nothing in the Release Notes nor in this thread indicate that INTERP1 is
going away. _Certain specific calling syntaxes_ for INTERP1 have been
announced in the Release Notes as being removed or changed. The _function as
a whole_ has not been announced as being removed or changed.
For the particular change that started this thread, let's take a look at the
section of the documentation that describes the implications of that syntax.
" If Y is a vector, it must have the same length as x. A scalar value for
Y is expanded to have the same length as x. xi can be a scalar, a vector, or
a multidimensional array, and yi has the same size as xi.
If Y is an array that is not a vector, the size of Y must have the form
[n,d1,d2,...,dk], where n is the length of x. The interpolation is performed
for each d1-by-d2-by-...-dk value in Y. The sizes of xi and yi are related
as follows:
If xi is a scalar or vector, size(yi) equals [length(xi), d1, d2,
..., dk].
If xi is an array of size [m1,m2,...,mj], yi has size
[m1,m2,...,mj,d1,d2,...,dk]."
If this change were to go through, I _think_ this section of the
documentation would become something like:
"Y must be a vector of the same size as x or must be a scalar. yi is the
same size as xi."
This makes it a lot easier to understand what INTERP1 is actually going to
give you. I haven't looked through the INTERP1 code recently but I expect
this change would also simplify the code and probably improve performance in
the case where x and y are both vectors, which I believe is a MUCH, MUCH
more common usage of INTERP1. Instead of spending a dozen lines of code
computing whether Y was the correct size to trigger this behavior and
carrying that information through the function, INTERP1 just has to check
"Are x and y the same size? If not, error out." and then the rest of the
code can rely upon that fact.
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com