To plot the given polynomial in the specified domain, you can follow these steps:
main.m42 chars2 lines
linspace
function:main.m21 chars2 lines
main.m10 chars2 lines
plot
function:main.m12 chars2 lines
xlabel
, ylabel
, and title
functions:main.m52 chars4 lines
The final Matlab code would look like this:
main.m314 chars17 lines
This will generate a plot of the given polynomial in the domain -5 < x < 5.
gistlibby LogSnag