How to assume a symbolic function as real

22 views (last 30 days)
Francesco
Francesco on 31 Oct 2014
Commented: Sean de Wolski on 31 Oct 2014
Hi everyone, I am new to symbolic math toolbox in Matlab, and I need help to do the following.
I need to declare a symbolic function of time a(t) - say it's an angle of a rotating vector - and I want to get rid of all the conj(a(t)) expressions when differentiating trigonometric functions of a(t).
I tried:
syms t a(t) real;
conj(a(t))
ans =
conj(a(t))
What's the correct way to do this?
Thanks in advance.

Answers (2)

Star Strider
Star Strider on 31 Oct 2014
Use the assume function:
syms t a(t) real
assume(a(t),'real')
conj(a(t))
produces:
ans =
a(t)
  2 Comments
Star Strider
Star Strider on 31 Oct 2014
I’ve been there myself more often than I care to mention!
Thanks!

Sign in to comment.


Francesco
Francesco on 31 Oct 2014
Thank you for the answer, I'm trying this in Matlab 2012, and it still gives:
syms t a(t) real
assume(a(t),'real')
conj(a(t))
ans =
conj(a(t))
Has it something to do with the version I'm using, or am I doing something wrong?
Thanks
  1 Comment
Sean de Wolski
Sean de Wolski on 31 Oct 2014
That's quite possibly an improvement that's been incorporated since then. If your company/university is current on maintenance, you can upgrade at no additional cost.

Sign in to comment.

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!