MATLAB Answers

Error when plotting a graph

13 views (last 30 days)
Hello, I am trying to plot the solution to the ordinary second order linear inhomogeneous differential equation:
x''(t)= -x + sin(1.1*t).
I am able to get the solution using the dsolve command, but when I try plotting it using 'plot(x,Solution)', I get an error message saying: 'Warning error updating parametrized function line the following error was reported evaluating the function..' and I can't scroll more to see the full error message.
Any help would be great!

  0 Comments

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 25 Nov 2019
Use fplot if you have R2016a or later, ezplot otherwise.

  6 Comments

Show 3 older comments
Star Strider
Star Strider on 25 Nov 2019
As always, my pleasure!
You did not call fplot correctly. Compare your call to it, and mine.
Call it as:
fplot(Solution, [0 10])
and it works.
Louis Sharma
Louis Sharma on 25 Nov 2019
Amazing! This was really helpful!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by