フィルターのクリア

area under the graph

7 ビュー (過去 30 日間)
vijayasinthujan vijayaratnam
vijayasinthujan vijayaratnam 2012 年 3 月 29 日
回答済み: nizar hamadeh 2015 年 9 月 22 日
how can i colored area which is under the graph (eg y=mx+c or any graph)with the boundary condition let say x is 2-5 and find the colored area ?

採用された回答

Wayne King
Wayne King 2012 年 3 月 29 日
You can use fill() to color in the area under the graph of a line, and you can use a numerical integration method like quad() to compute the integral:
x = 0:0.01:1;
y = 2*x-2;
axis([0 1 -2 0]);
x1 = [0 1 1];
y1 = [-2 -2 0];
fill(x1,y1,'r');
hold on;
plot(x,y,'k','linewidth',2);
Q = quad(@(x) 2*x-2,0,1)
  1 件のコメント
vijayasinthujan vijayaratnam
vijayasinthujan vijayaratnam 2012 年 3 月 29 日
thank u wayne KING

サインインしてコメントする。

その他の回答 (2 件)

Richard
Richard 2012 年 3 月 29 日

nizar hamadeh
nizar hamadeh 2015 年 9 月 22 日
if auc is 0.9 how can i draw it

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by