MATLAB: Question on Graphing / Plotting

matlab function

Currently i have:
syms x
Y = sqrt ((x^4 - x + 1) / x^4 + x +1 )
I take the derivative of that using diff Y and get one.
The problem I am having is trying to graph the original Y and the diff Y on the same screen. It wont allow me to plot either through the workspace and was wondering if theres a simple command to use to graph them for comparison. Any help would be appreciated thank you!

Best Answer

You're likely looking for ezplot. Regular plot doesn't play well with syms:
syms x
Y = sin(x);
dY = diff(Y);
ezplot(Y,dY);