function y=odddouble(a,b)
y=2*x+1
endfunction
you can do >>> h = under(@(x) 1/x, odddouble)
>>> h(3)
?
If so, yeah, I agree you can implement under in matlab (as long as you have the symbolic toolbox as well); in which case it's probably one of very few non-CAS systems where you can define it.It is definitely not as elegant as the built-in facility in J, but definitely doable and usable in Matlab. In fact, I think any language with flexible enough function overloading should be able to implement such a feature.