Making a parabola and plotting

260 ビュー (過去 30 日間)
Nicholas Deosaran
Nicholas Deosaran 2020 年 9 月 15 日
回答済み: Ameer Hamza 2020 年 9 月 15 日
how can you make a parabola (is it not y = ax^2)? and plot it.
Also how to overlay two more parabolas on the same axes using 0.5a and 2a

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 9 月 15 日
You need to use hold() to plot multiple lines on one axes
x = linspace(-5, 5, 100);
y1 = 0.5*x.^2;
y2 = 2*x.^2;
f = figure();
ax = axes();
hold(ax); % to plot multiple lines on one axes
plot(x, y1);
plot(x, y2);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by