To plot a polynomial in Matlab within a certain domain, you can use the polyval
function to evaluate the polynomial at a range of points and then plot the resulting curve. Here's how you can do it for the polynomial y=0.7x^4-13.5x^2+6x-37
in the domain -5<x<5
:
main.m228 chars12 lines
This will create a plot of the polynomial within the domain -5<x<5
.
gistlibby LogSnag