How can I plot a polynomial function in MATLAB? for example: 3xy^3+ 2x^2 y^2+ 6xy^3

 Akzeptierte Antwort

Mathieu NOE
Mathieu NOE am 12 Okt. 2023

0 Stimmen

hi
see meshgrid and surf documentaion
[x,y] = meshgrid(-2:.2:2,-4:.4:4);
z = 3*x.*y.^3+ 2*x.^2 .*y.^2+ 6*x.*y.^3;
surf(x,y,z)

1 Kommentar

You can directly use fsurf as well -
fsurf(@(x,y) 3*x.*y.^3+ 2*x.^2.*y.^2+ 6*x.*y.^3)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Produkte

Version

R2023b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by