[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Opinions on Matlab compatibility, Octave development
From: |
Judd Storrs |
Subject: |
Re: Opinions on Matlab compatibility, Octave development |
Date: |
Wed, 2 Jun 2010 17:00:39 -0400 |
2010/6/2 Jaroslav Hajek <address@hidden>:
> I don't think it's that bad. Surely, the necessity to parenthesize the
> keywords is a bit of burden, but otherwise the approach is basically
> equivalent, from a user point of view, to other languages with
> explicit keyword arguments, like Python (I don't know IDL but I assume
> it's similar there). The positive is that it doesn't need a special
> syntax, and using runtime-constructed argument lists is natural. A
> disadvantage is that parsing is difficult, but a lot can be handled by
> extra funcs (cf. Octave's new parseparams).
One of the things that is easy in IDL that I occasionally wish I knew
how to do easily in octave is to write fully functional wrapper
functions. I've never succeeded in doing this simply in octave/matlab
but probably it's a limitation of my octave/matlab skills.
As a simple exercise, how does one create a wrapper to plot() that
simply adds "markersize",3 to the property list and then calls plot?
This doesn't work:
function myplot(varargs)
return plot(varargs, "markersize",3)
endfunction
plot(1:4,"*","markersize",3)
myplot(1:4,"*")
myplot(1:4,"*","color","red")
I've tried other things but I haven't figured it out. Bonus points if
you figure out how to get it to work with varargout functions.
--judd
- Opinions on Matlab compatibility, Octave development, Jordi Gutiérrez Hermoso, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Jaroslav Hajek, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Sergei Steshenko, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, John Swensen, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Jaroslav Hajek, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Emmanuel FARHI, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development,
Judd Storrs <=
- Re: Opinions on Matlab compatibility, Octave development, bpabbott, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Søren Hauberg, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/02
Re: Opinions on Matlab compatibility, Octave development, fork, 2010/06/02
- Re: Opinions on Matlab compatibility, Octave development, CdeMills, 2010/06/04
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/04
- Re: Opinions on Matlab compatibility, Octave development, John W. Eaton, 2010/06/04
- Re: Opinions on Matlab compatibility, Octave development, Judd Storrs, 2010/06/04
- Re: Opinions on Matlab compatibility, Octave development, Jordi Gutiérrez Hermoso, 2010/06/04