how to plot into quadratic graph?

 采纳的回答

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

4 个评论

it still can't run , what i have to add into that code? Matlab product i use is R2015b
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);
thank you so much!!!
Glad to be of help.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Line Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by