フィルターのクリア

Graphical method of finding roots g(x) = h(x) ?

12 ビュー (過去 30 日間)
x y
x y 2014 年 10 月 17 日
回答済み: x y 2014 年 10 月 17 日
Hy, I wonder how to get this plot in Matlab /this is the Graphical method of finding roots in my book for numeric methods, first step in bisection method/
I tried to plot out same graph but didnt get the same.
x = -100:.1:100;
g = inline('x + 1');
h = inline('x.^3');
y1 = g(x);
x1 = h(x);
plot(x1,y1)

採用された回答

Mike Garrity
Mike Garrity 2014 年 10 月 17 日
The plot command you have is plotting 'x+1' against 'x^3'. I think that what you want is something more like this:
plot(x,g(x))
hold on
plot(x,h(x))
That's plotting each of them against x in turn.
You'll need some additional touches like setting the XLim and YLim and adding labels and things.

その他の回答 (1 件)

x y
x y 2014 年 10 月 17 日
thank you :)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by