Area in a function
3 ビュー (過去 30 日間)
古いコメントを表示
Im trying to fill the area under a function but I dont know how to exactly do it, I want to plot the area between [-1, 1]
syms f(x)
f=1-x^4
t=0
I=int(f)
Area=subs(I,1)-subs(I,-1)
fplot(f,[-1,1])
hold on
fplot(t,'b')
0 件のコメント
回答 (1 件)
David Hill
2022 年 1 月 26 日
x=-1:.001:1;
f=1-x.^4;
g=zeros(size(x));
plot(x,g,x,f);
x2 = [x, fliplr(x)];
inBetween = [g, fliplr(f)];
fill(x2, inBetween, 'g');
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!