问题
How can I color the part in red using scilab and xfpoly. Is there a way to color the calculated surface just after the integral between two bounds?
回答1:
I suppose that your function is called with g(x)
as in your previous post. The following should do what you want:
x=linspace(5,50,200);
plot(x,g(x))
deff('y=f(x,y0)','y=g(x)-y0')
x1 = fsolve(45,list(f,40))
x2 = fsolve(x1,list(f,30))
xv = linspace(x1,x2,1000);
yv = [40 g(xv) 30];
xv = [45 xv 45];
xfpoly(xv,yv,color('red'))
来源:https://stackoverflow.com/questions/55514759/how-can-i-color-the-part-in-red-using-scilab-and-xfpoly