I'm trying to plot this equation, if anyone can help

1 回表示 (過去 30 日間)
Kevin Valdez
Kevin Valdez 2020 年 11 月 29 日
回答済み: John D'Errico 2020 年 11 月 29 日
y² = 4ax

回答 (2 件)

Star Strider
Star Strider 2020 年 11 月 29 日
Take the square root of both sides, and plot:
y = +sqrt(4*a*x);
y = -sqrt(4*a*x);
That’s how I would do it, anyway.

John D'Errico
John D'Errico 2020 年 11 月 29 日
If no value is supplied for a, then what will you plot?
Perhaps you might do this:
a = 0.25:0.25:2;
L = cell(size(a));
for ind = 1:numel(a)
ai = a(ind);
fun = @(x,y) y.^2 - 4*ai*x;
fimplicit(fun,[0,10,-10,10])
hold on
L{ind} = ['a = ',num2str(ai)];
end
legend(L{:},'location','northwest')

カテゴリ

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