why does EZplot work but not fplot
Show older comments
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.
Answers (1)
Star Strider
on 6 Nov 2020
0 votes
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.
Categories
Find more on Line Plots 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!
