Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diff(symfun) should respect @symfun/symvar ordering #550

Open
cbm755 opened this issue Sep 14, 2016 · 3 comments
Open

diff(symfun) should respect @symfun/symvar ordering #550

cbm755 opened this issue Sep 14, 2016 · 3 comments

Comments

@cbm755
Copy link
Collaborator

cbm755 commented Sep 14, 2016

@sym/symvar and @symfun/symvar are subtly different (as documented).

diff(f) where f is a symfun should use @symfun/symvar, but it looks like it does not:

syms f(g, h)
diff(f)
ans(g, h) = (symfun)

  ∂          
  ──(f(g, h))
  ∂h         

I think that should be w.r.t. g because:

symvar(f, 1)
ans = (sym) g
@cbm755
Copy link
Collaborator Author

cbm755 commented Sep 14, 2016

So in @symvar/diff we call diff(f.sym, ...) (effectively casting to @sym).

I think instead we should call the superclass method @sym/diff on f itself.

If this was classdef, that should be diff@sym(f, ...). But how do we accomplish that with old-style classes?

@mtmiller do you happen to know how to call a superclass method in old-style classes?

@mtmiller
Copy link
Collaborator

No sorry

@cbm755
Copy link
Collaborator Author

cbm755 commented Sep 14, 2016

might punt this until we are based on classdef (#545) and see if it can be easily fixed after that.

@cbm755 cbm755 mentioned this issue Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants