- #1

Physics_rocks

- 12

- 0

I'm trying to draw the following function , however MATLAB doesn't like my code . What am I doing wrong ?

z = x + (y – 100)^2

where x = -50 : 50,

y = 0 : 200

my code :

[x,y]=meshgrid(-50:1:50,-0:1:200)

surf(x , y , x. + (y.-100)^2)

[x,y]=meshgrid(-50:1:50,-0:1:200)

surf(x , y , x. + (y.-100)^2)

thank you