MATLAB Answers

Plotting the given Trigonometric functions

2 views (last 30 days)
Adrian Oblena
Adrian Oblena on 27 Nov 2020
Commented: KSSV on 27 Nov 2020
Can someone help me on plotting the function ysin(2x) = xcos(2y)?

  0 Comments

Sign in to comment.

Accepted Answer

Ameer Hamza
Ameer Hamza on 27 Nov 2020
Edited: Ameer Hamza on 27 Nov 2020
You can use fimplicit()
fun = @(x, y) y.*sin(2*x) - x.*cos(2*y);
fimplicit(fun, [-10 10 -10 10])

  0 Comments

Sign in to comment.

More Answers (1)

KSSV
KSSV on 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 Comments

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

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!