how can i draw graph of z^2=x^2-y^2 on matlab

7 次查看(过去 30 天)

采纳的回答

Star Strider
Star Strider 2017-2-12
Is this what you want:
f = @(x,y) (x.^2 - y.^2).^2; % Your Function
x = linspace(-10, 10, 150); % X-Range
y = linspace(-10, 10, 150); % Y-Range
[X,Y] = meshgrid(x,y); % Create Matrix Arguments
figure(1)
sh = surf(X, Y, f(X,Y));
set(sh, 'EdgeColor','none')
grid on
  6 个评论
curry
curry 2019-12-11
complex number is not allowed .something wrong?

请先登录,再进行评论。

更多回答(2 个)

Walter Roberson
Walter Roberson 2019-3-24
syms x y z
eqn = z^2 == x^2 - y^2;
fimplict3(eqn)

Salwa Aqeel
Salwa Aqeel 2019-10-7
编辑:Walter Roberson 2019-10-8
dydt=-y(1)+1
y(0)=0
  3 个评论
Walter Roberson
Walter Roberson 2020-3-10
MATLAB uses exp() to express e^
Also MATLAB does not have any implied multiplication such as between the x and the (x^2 etc

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by