Plotting mathematical functions in matplot

I need to plot this in python.
y=(1-x) ^3 -2.
-1≤ x ≤ 5.(How do I define this range?)

 採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 5 月 22 日

1 投票

In MATLAB, you can plot it using:
y=@(x)((1-x).^3-2);
fplot(y, [-1, 5]);

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by