![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/473162/image.png)
how do I shade area under graph with specific x interval?
17 次查看(过去 30 天)
显示 更早的评论
a=10;
t=0:0.1:200;
c_L=0.2.*(1-exp(1).^(-1/a.*t))
plot(t,c_L)
this is my graph and I just want to shade area between t=60:0.1:200;
what function should I use?
0 个评论
采纳的回答
Ameer Hamza
2020-12-29
Try something like this
a=10;
t=0:0.1:200;
c_L=0.2.*(1-exp(1).^(-1/a.*t));
t_shade = 60:0.1:200;
c_L_shade = 0.2.*(1-exp(1).^(-1/a.*t_shade));
plot(t,c_L)
hold on
patch([t_shade fliplr(t_shade)], [c_L_shade zeros(size(c_L_shade))], ...
'r', ...
'FaceAlpha', 0.2)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/473162/image.png)
2 个评论
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!