資源簡介
可以用于在matlab中根據曲線畫出陰影,用于表示置信區間的一種方法。
代碼片段和文件信息
function[fillhandlemsg]=jbfill(xpointsupperlowercoloredgeaddtransparency)
%USAGE:?[fillhandlemsg]=jbfill(xpointsupperlowercoloredgeaddtransparency)
%This?function?will?fill?a?region?with?a?color?between?the?two?vectors?provided
%using?the?Matlab?fill?command.
%
%fillhandle?is?the?returned?handle?to?the?filled?region?in?the?plot.
%xpoints=?The?horizontal?data?points?(ie?frequencies).?Note?length(Upper)
%?????????must?equal?Length(lower)and?must?equal?length(xpoints)!
%upper?=?the?upper?curve?values?(data?can?be?less?than?lower)
%lower?=?the?lower?curve?values?(data?can?be?more?than?upper)
%color?=?the?color?of?the?filled?area?
%edge??=?the?color?around?the?edge?of?the?filled?area
%add???=?a?flag?to?add?to?the?current?plot?or?make?a?new?one.
%transparency?is?a?value?ranging?from?1?for?opaque?to?0?for?invisible?for
%the?filled?color?only.
%
%John?A.?Bockstege?November?2006;
%Example:
%?????a=rand(120);%Vector?of?
評論
共有 條評論