Plotting the given Trigonometric functions

 Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 27 Nov. 2020
Bearbeitet: Ameer Hamza am 27 Nov. 2020

0 Stimmen

You can use fimplicit()
fun = @(x, y) y.*sin(2*x) - x.*cos(2*y);
fimplicit(fun, [-10 10 -10 10])

Weitere Antworten (1)

KSSV
KSSV am 27 Nov. 2020
x = linspace(-pi,+pi);
y = x ;
[X,Y] = meshgrid(x,y) ;
Z = Y.*sin(2*X)-X.*cos(2*Y) ;
surf(X,Y,Z)
colorbar

2 Kommentare

Adrian Oblena
Adrian Oblena am 27 Nov. 2020
Can it be plotted only in 2D? Value of x and y only? Thank you
KSSV
KSSV am 27 Nov. 2020
Use pcolor instead of surf. Also have a look on contour.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by