How do I constrain symbolic functions to the real numbers in MATLAB R2025a Symbolic Math Toolbox?
I am computing pinv() on functions of time, and the inverse outputs complex values in the form of "conj(expr)". However, I know the function should be real, and I want to constrain the function to the real values.
According to the "assume" function documentation, only symbolic variables and expressions can be assumed real. Syntax such as:
>> syms x1(t) x2(t) real
and
>> syms x1(t) x2(t)
>> assume(x1, 'real'); assumeAlso(x2, 'real')
are not supported. See the error:
"Error using symfun/assume (line 12) Assumptions on symbolic functions not supported. Make assumptions on symbolic variables and expressions instead."
What is the best way to assume my functions are real so that I do not get complex results after computation?
採用された回答
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!