plot and then plot the same graph with filled area
조회 수: 2 (최근 30일)
이전 댓글 표시
Greetings all,
I am working on developing a code to polt a curve then plot another code for the same curve with area underneath filled. my cose is as follow:
x = ([0,2*pi])
w = @(x) x*exp(-x)*cos(x)
fplot(w ,x)
figure;
area(w)
the first plot is OK but the second is not
댓글 수: 0
답변 (1개)
KSSV
2021년 9월 8일
x = linspace(0,2*pi) ;
w = @(x) x.*exp(-x).*cos(x) ;
y = w(x) ;
figure
plot(x ,y)
figure;
area(x,y)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

