why does EZplot work but not fplot
显示 更早的评论
Second order inhomogeneous differential equation with constant coefficients. Initial Conditions.
I'm trying to graph the solution given by dsolve, but if I graph it using fplot, it gives this strange barcode figure.
syms s t y(t) Y;
Dy=diff(y,t);
D2y=diff(y,t,2);
ode1=D2y+Dy+y==(t+1)^3*exp(-t)*cos(t)*sin(3*t);
ySol=dsolve(ode1,[y(0)==1, Dy(0)==0]);
ezplot(ySol,[0 15])
axis([0 15 -1 1])
fplot(ySol,[0 15])
I know that the ezplot graph is correct because it looks the same as the solution by using a laplace transform, which I can graph with fplot.
回答(1 个)
Star Strider
2020-11-6
0 个投票
I recall seeing that problem earlier.
First, be certain that you have installed the latest MATLAB Update for R2019a.
Second, it could be a rendering issue, so cnsider using the opengl function, specifically Use Software OpenGL for Current Session
If the opengl function solves it, consider updating your graphics card drivers to provide a permanent solution.
类别
在 帮助中心 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

