How do i plot this quadratic graph?
古いコメントを表示
I'm trying to plot this quadratic graph. For some reason it looks like this. It's not crossing the x axis for some reason the x axis are down. I need to fix it please.
This is the graph and the code.
2 件のコメント
Setsuna Yuuki.
2020 年 11 月 22 日
that depends on the values of "a" "b" and "c", perhaps those values do not allow zero crossing.
Yaseen Noaman
2020 年 11 月 22 日
回答 (1 件)
x = -10:10;
y = polyval([1 -2 -4],x);
plot(x,y)
r = roots([1 -2 -4])
text(r(1),0,'\leftarrow Root')
text(r(2),0,'\leftarrow Root')
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!