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

12 visualizaciones (últimos 30 días)
Rabia Kanwal
Rabia Kanwal el 12 de Feb. de 2017
Comentada: Walter Roberson el 10 de Mzo. de 2020

Respuesta aceptada

Star Strider
Star Strider el 12 de Feb. de 2017
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 comentarios
darova
darova el 7 de Oct. de 2019
As always, my plesure!
curry
curry el 11 de Dic. de 2019
complex number is not allowed .something wrong?

Iniciar sesión para comentar.

Más respuestas (2)

Walter Roberson
Walter Roberson el 24 de Mzo. de 2019
syms x y z
eqn = z^2 == x^2 - y^2;
fimplict3(eqn)

Salwa Aqeel
Salwa Aqeel el 7 de Oct. de 2019
Editada: Walter Roberson el 8 de Oct. de 2019
dydt=-y(1)+1
y(0)=0
  3 comentarios
Sandhiya N
Sandhiya N el 10 de Mzo. de 2020
Z=e^-x(x^2+y^2)
Walter Roberson
Walter Roberson el 10 de Mzo. de 2020
MATLAB uses exp() to express e^
Also MATLAB does not have any implied multiplication such as between the x and the (x^2 etc

Iniciar sesión para comentar.

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by