Simplify Symbolic Values of All Fields in Struct

6 views (last 30 days)
Hello,
I have a struct containing multiple fields. The value of each field is a symbolic expression. Is there a way I can simplify the symbolic values of all fields in the struct. The command simplify(MyStruct) does not work.
Thank you,
Kevin

Accepted Answer

Walter Roberson
Walter Roberson on 12 Apr 2013
structfun(@simplify, MyStruct, 'Uniform', 0)
  1 Comment
Kevin Bachovchin
Kevin Bachovchin on 12 Apr 2013
Thanks, works perfectly.
Would you please be able to answer my question in response to your answer in the thread http://www.mathworks.com/matlabcentral/answers/71498-using-a-symbolic-expression ? If you could, I'd really appreciate it.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!