Question on Graphing / Plotting
이전 댓글 표시
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!
채택된 답변
추가 답변 (1개)
Walter Roberson
2012년 12월 12일
diff Y
means
diff('Y')
Since the only variable found in that is Y, that means
diff('Y', 'Y')
and the derivative of that is clearly 1.
Perhaps you meant
diff(Y)
댓글 수: 2
Frank
2012년 12월 12일
Walter Roberson
2012년 12월 12일
f = matlabFunction(diff(Y), 'vars', x);
t = linspace(-3,3,100);
plot(t, f(t))
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!