求问,图片中灰色的部分是怎么绘制的呀,想给平行于y轴的举行区域填色,但是fill和area都没成功

 採用された回答

moheno
moheno 2023 年 5 月 17 日

0 投票

这样的图像是否满足你的要求:请你自己稍加修改程序,以致达到你的要求!
clear;
clc;
t = 0:0.01:20;
y = sin(t);
hold on
area([5,7],[3,3],'facecolor','g')
area([5,7],[-3,-3],'facecolor','g')
plot(t,y,'r')

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange启动和关闭 についてさらに検索

質問済み:

2023 年 5 月 17 日

回答済み:

2023 年 5 月 17 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!