i trying to 3d plot, but mesh nor plot3 worked

1 view (last 30 days)
the function is f(x,y)= 10*x^2*y -5*x^2- 4y^2 -x^4 -2y^4
so when i add "." to the y behind x^2, matlab didn't like it one bit. No matter what i tried it seems to only show a meshgrid plain at best
pic is what i expects it to looks like. And most matlab examples aren't steep like this, so im getting out of ideas too

Accepted Answer

the cyclist
the cyclist on 10 Aug 2022
This is what I get from your equation:
xv = -5 : 0.01 : 5;
yv = -5 : 0.01 : 5;
[x,y] = meshgrid(xv,yv);
f = 10*x.^2.*y - 5*x.^2 - 4*y.^2 - x.^4 - 2*y.^4;
Are you absolutely sure you keyed the same equation into the two different software systems? (I can't see the full equation in your image.)

Sign in to comment.

More Answers (0)


Community Treasure Hunt

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

Start Hunting!