MATLAB: How to shade area under graph with specific x interval areagraphshade 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? Best Answer Try something like thisa=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 onpatch([t_shade fliplr(t_shade)], [c_L_shade zeros(size(c_L_shade))], ... 'r', ... 'FaceAlpha', 0.2) Related SolutionsMATLAB: Multiple graph plotting error See: multiple graphs plotting error MATLAB: Find vertices and plot triangle in Matlab plot(tri(1,:), tri(2,:)) Related QuestionMultiple graphs plotting errorHow to triangulate a non-convex ordered set of points
Best Answer