MATLAB: Issue with reality assumption of an implicit function

MATLABreal implicit function assumption

Why is the assumption on the reality of f(t) lost by assuming real a different function?
Is this a bug?
In fact:
syms f(t) g(t) t real
assume(f(t),'real')
isreal(f(t))
assume(g(t),'real')
isreal(f(t))
returns:
ans =
logical
1
ans =
logical
0
Any help would be appreciated.

Best Answer

I solved the problem by using assumeAlso instead of assume, inspired by the answer to https://www.mathworks.com/matlabcentral/answers/78614-how-do-you-declare-a-symbolic-function-of-time-as-a-real-variable
The following code gives no warning and the expected result.
syms f(t) g(t) t
assumeAlso(f(t),'real')
isreal(f(t))
assumeAlso(g(t),'real')
isreal(f(t))
No idea still why "assume" would not work...
Related Question