How to shade the area between two curves? [duplicate]

Multi tool use
Multi tool use

How to shade the area between two curves? [duplicate]



This question already has an answer here:



I tried the following code to shade the area between two curves.


x=1:1:216;
y1=upper
y2=lower
% plot the line edges
hold on
plot(x', y1, 'LineWidth', 1);
plot(x', y2, 'LineWidth', 1);
% plot the shaded area
fill([x' fliplr(x')], [y2 fliplr(y1)], 'r');



But it doesn't work, I get the following output:



following output



Do you have any suggestions as to what may have gone wrong?



This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






I think I just addressed your problem in an answer on a duplicate question: you are using column vectors in the call to fill.

– gnovice
Sep 12 '18 at 16:11


fill




0

7,6hU,CyAQ,fpiFi9KAIoEKvqC3DyNd9ZOzfkTHVGEmZn
saX9bzSur3zi0 WHHaz8oSPp1d3z93FKFA1AE,C5 2b

Popular posts from this blog

Old paper Canadian currency

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế