【发布时间】:2023-03-22 07:10:01
【问题描述】:
我在下面的链接中关注该问题的投票最多的答案,但我没有得到任何结果。 MATLAB, Filling in the area between two sets of data, lines in one figure
我想填充一条水平线 y=6 和另一条水平线 y=9 之间的区域
x=ones(1,110) %#initialize x array
y1=6*(x); %#create first curve
y2=9*(x); %#create second curve
X=[x,fliplr(x)]; %#create continuous x value array for
Y=[y1,fliplr(y2)]; %#create y values for out and
fill(X,Y,'b'); %#plot filled area
只是它不起作用!知道为什么不?
【问题讨论】: