採用された回答

Ameer Hamza
Ameer Hamza 2020 年 3 月 22 日

0 投票

f = @(x,y) 100*(y-y.^2).^2+(1-x).^2;
fsurf(f, [-10 10 -10 10])

4 件のコメント

risky amalia
risky amalia 2020 年 3 月 22 日
it still can't run , what i have to add into that code? Matlab product i use is R2015b
Ameer Hamza
Ameer Hamza 2020 年 3 月 22 日
fsurf was introduced in R2016b. You can use the following code in R2015b
f = @(x,y) 100*(y-y.^2).^2+(1-x).^2;
[X, Y] = meshgrid(linspace(-10, 10), linspace(-10, 10));
Z = f(X, Y);
surf(X,Y,Z);
risky amalia
risky amalia 2020 年 3 月 22 日
thank you so much!!!
Ameer Hamza
Ameer Hamza 2020 年 3 月 22 日
Glad to be of help.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by