Plotting the given Trigonometric functions

32 次查看(过去 30 天)
Can someone help me on plotting the function ysin(2x) = xcos(2y)?

采纳的回答

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

更多回答(1 个)

KSSV
KSSV 2020-11-27
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 个评论
Adrian Oblena
Adrian Oblena 2020-11-27
Can it be plotted only in 2D? Value of x and y only? Thank you
KSSV
KSSV 2020-11-27
Use pcolor instead of surf. Also have a look on contour.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by