You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi again, well i found this trying to edit the diff function, i think its more simple with a example:
>> syms t f(g) g(t)
>> symvar(f)
ans = (sym) g
>> symvar(symvar(f))
ans = (sym) g
as you can see this is weird, the first part its fine the symbol of f is g, but the symbol of g is t and we get g again, as a note, symvar return a list of symbols but it don't exactly match with the input, its correct say the vars of f is g, but in the text g is printed as a symbol and should be a symfun, theoretically, this should be like this:
>> syms t f(g) g(t)
>> symvar(f)
ans = (symfun) g
>> symvar(symvar(f))
ans = (sym) t
a little trick is do this (i don't like this):
>> syms t f(g) g(t)
>> eval(disp(symvar(f)))
ans = (symfun) g
>> eval(disp(symvar(eval(disp(symvar(f))))))
ans = (sym) t
And this don't works inside a functions D:
the idea in this its can apply correctly the diff to functions, for that reason this is necessary.
Thx. Cya.
The text was updated successfully, but these errors were encountered:
>> syms t f(g) g(t)
>> t
t =
t
>> f
f(g) =
f(g)
>> g
g(t) =
g(t)
>> symvar(f)
ans =
g
>>
syms goes left to right. It first makes f(g) then it makes g(t) which overwrites the sym g. It think messing around with previous symfun's would be too magical and probably annoy someone.
Hi again, well i found this trying to edit the diff function, i think its more simple with a example:
as you can see this is weird, the first part its fine the symbol of f is g, but the symbol of g is t and we get g again, as a note, symvar return a list of symbols but it don't exactly match with the input, its correct say the vars of f is g, but in the text g is printed as a symbol and should be a symfun, theoretically, this should be like this:
a little trick is do this (i don't like this):
And this don't works inside a functions D:
the idea in this its can apply correctly the diff to functions, for that reason this is necessary.
Thx. Cya.
The text was updated successfully, but these errors were encountered: