Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Why is interp1(x,Y,...) being removed?
Replies: 55   Last Post: Oct 16, 2012 5:10 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Richard Crozier

Posts: 111
Registered: 3/19/09
Re: Why is interp1(x,Y,...) being removed?
Posted: Oct 15, 2012 2:05 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Steven_Lord" <slord@mathworks.com> wrote in message <k5hfec$s8$1@newscl01ah.mathworks.com>...
>
>
> "Richard Crozier" <r.crozier@ed.ac.uk> wrote in message
> news:k5hbsc$gbs$1@newscl01ah.mathworks.com...

> > "Steven_Lord" <slord@mathworks.com> wrote in message
> > <k5hae9$am2$1@newscl01ah.mathworks.com>...
> >

> >>
> >> It's not justification. It's identifying a use case for INTERP1 (and by
> >> extension INTERP2, INTERP3, etc.) that we may not have known about, or
> >> identifying a use case we did know about as being a more frequent usage
> >> of the functionality than we estimated or measured.
> >>

> >
> > Ok, but isn't this something you do for new functions, not ones that have
> > been in use for years?

>
> Identifying use cases we didn't know about? Yes, that's more focused on new
> functions.
> Recalibrating how "popular" a particular use case is? That applies to both
> new functions and older ones.
>

> > Isn't there research on the use cases from when you first introduced this
> > function? What has changed in the intervening years? Have people recently
> > stopped wanting to interpolate several sets of data at the same points at
> > once?
> >
> > This reminds me of the ode solvers which have a handy syntax where you can
> > supply extra arguments which are also then passed to your solution
> > function and event and output functions, but it is deprecated and not
> > documented because TMW have decided users are too stupid to understand the
> > feature.

>
> No, that was deprecated because we came up with other ways (anonymous
> functions, nested functions) to pass additional inputs to solution, event,
> and output functions that:
>
> 1) Did not prevent us from _ever_ adding additional input arguments to the
> ODE solvers by forcing the ODE solvers to treat ALL input arguments after
> the 4th (in the case of ODE45) as additional inputs to the user-specified
> functions.
> 2) Did not require users to have to specify as empty matrices inputs between
> the last one they wanted to specify and the additional inputs (a common
> source of errors in the Optimization "function functions" like FMINCON;
> admittedly not so big a deal in the ODE solvers.)
> 3) Was consistent with the new system used by the other "function functions"
> like the aforementioned FMINCON. [The main benefit to FMINCON AFAIK was item
> 2, as that was a source of a LOT of pain and CSSM postings. Miss one [] and
> suddenly the first of your additional inputs was treated as your options
> structure.]
> 4) Did not require ALL the user-specified functions in the ODE* call to
> accept ALL the input arguments even if the specific user-specified function
> used NONE of them.
>
> You'll note that the trailing input syntax DOES still work for backwards
> compatibility. But we recommend that you use the newer approach for these
> four reasons (and possibly others that I can't remember off the top of my
> head right now.)
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com


So item one in your doc from 2003 and your list above translate to "too confusing for users", which I am facetiously taking to be the same as what I said.

Here's one beef I have with anonymous functions:

aninput = rand(1000,1000);
infoonaninput = whos('aninput')
a = struct('a', @(t,y) y*aninput);
whos
a = struct('a', @(t,y) y*aninput, 'b', @(t,y) y*aninput, 'c', @(t,y) y*aninput);
whos
save('test.mat', 'a');
fiinfo = dir('test.mat')
fprintf(1, '3 * size of aninput is: %f\n', 3 * infoonaninput.bytes);
% now lets see what happens if we get rid of the data
clear aninput
whos
result = a.a(0,0);
whos
fprintf(1, 'Wow, it still knows about the deleted data, that''s fancy compression!\n');

Now since matlab lies about the size of a, I don't actually know if this data replication happens in RAM too, but in my case I actually have an application where I do something similar to the above, but with many copies of the functions saved and loaded.

Another problem is that the saved function handles don't work across computers because they reference a specific function location.

Nested function, well, nested functions are the work of the devil being merely global variable in disguise, but that's just my opinion.


Date Subject Author
10/10/12
Read Why is interp1(x,Y,...) being removed?
Richard Crozier
10/10/12
Read Re: Why is interp1(x,Y,...) being removed?
Matt J
10/10/12
Read Re: Why is interp1(x,Y,...) being removed?
Richard Crozier
10/11/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/11/12
Read Re: Why is interp1(x,Y,...) being removed?
Matt J
10/11/12
Read Re: Why is interp1(x,Y,...) being removed?
Richard Crozier
10/11/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/11/12
Read Re: Why is interp1(x,Y,...) being removed?
Matt J
10/10/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/10/12
Read Re: Why is interp1(x,Y,...) being removed?
Bruno Luong
10/10/12
Read Re: Why is interp1(x,Y,...) being removed?
james bejon
10/10/12
Read Re: Why is interp1(x,Y,...) being removed?
Richard Crozier
10/10/12
Read Re: Why is interp1(x,Y,...) being removed?
Derek Goring
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
Penny Anderson
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
Matt J
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
james bejon
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
Steven Lord
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/13/12
Read Re: Why is interp1(x,Y,...) being removed?
Bruno Luong
10/13/12
Read Re: Why is interp1(x,Y,...) being removed?
Matt J
10/13/12
Read Re: Why is interp1(x,Y,...) being removed?
Bruno Luong
10/13/12
Read Re: Why is interp1(x,Y,...) being removed?
Matt J
10/13/12
Read Re: Why is interp1(x,Y,...) being removed?
Bruno Luong
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
Steven Lord
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/16/12
Read Re: Why is interp1(x,Y,...) being removed?
Bruno Luong
10/16/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/16/12
Read Re: Why is interp1(x,Y,...) being removed?
Richard Crozier
10/16/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/16/12
Read Re: Why is interp1(x,Y,...) being removed?
Bruno Luong
10/16/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/16/12
Read Re: Why is interp1(x,Y,...) being removed?
Richard Crozier
10/16/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/13/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/11/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
Penny Anderson
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
Steven Lord
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
Richard Crozier
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
Steve Eddins
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
Steven Lord
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
Richard Crozier
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
Steve Eddins
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
Bruno Luong
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
Ken Garrard
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/15/12
Read Re: Why is interp1(x,Y,...) being removed?
dpb
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
Bruno Luong
10/13/12
Read Re: Why is interp1(x,Y,...) being removed?
Richard Crozier
10/12/12
Read Re: Why is interp1(x,Y,...) being removed?
Mark Shore

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.