plot and then plot the same graph with filled area
1 回表示 (過去 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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!