How to simplify function handles?
Show older comments
Y =
function_handle with value:
@(s) (F(s)-Q(s))/P(s)
As seen, I have three functions F, Q and P and Y is function made by algebraic operations on these three. Is there a way, to get a simplified expression for Y in terms of the function variable (s) ? When I type in Y in command window, I just get the result as shown above.
As a simplified example:
F = @(s) s;
Q = @(s) s^2;
P = @(s) s^3-3*s^2-1;
Y = @(s) (F(s) - Q(s))/P(s);
When i type in Y in command window, what is see is:
Y =
function_handle with value:
@(s) (F(s)-Q(s))/P(s)
What I wish to see is:
Y = (s-s^2)/(s^3-3*s^2-1)
2 Comments
the cyclist
on 19 Aug 2021
It would helpful if you included a small example of what you see, and what you wish to see.
anuj maheshwari
on 19 Aug 2021
Accepted Answer
More Answers (0)
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!
















