symbolic
symbolic copied to clipboard
diff(symfun) should respect `@symfun/symvar` ordering
@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
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?
No sorry
might punt this until we are based on classdef (#545) and see if it can be easily fixed after that.