Hi,
I'm trying to plot equation
The end product should look like this
I can do the rectangle and I can change the colors when needed to but I'm having trouble plotting the equation I showed.
What I'm trying right now is
X=0.1:4.1 Y=-1./3.*(x-2).*(x-2.5).*((x./2)-2.75).*((x./5)-3.25).*(x-4)-1.45x1=1,y1=3x2=1.5,y2=5x3=2,y3=3x4=1.5,y4=1x5=1,y5=3x=[x1 x2 x3 x4 x5]y=[y1 y2 y3 y4 y5]plot(x,y, X, Y)
What I'm getting with that is nothing like the one that I want.
Help is appreciated!
Best Answer