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

9 vues (au cours des 30 derniers jours)
Rabia Kanwal
Rabia Kanwal le 12 Fév 2017
Commenté : Walter Roberson le 10 Mar 2020

Réponse acceptée

Star Strider
Star Strider le 12 Fév 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 commentaires
darova
darova le 7 Oct 2019
As always, my plesure!
curry
curry le 11 Déc 2019
complex number is not allowed .something wrong?

Connectez-vous pour commenter.

Plus de réponses (2)

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

Salwa Aqeel
Salwa Aqeel le 7 Oct 2019
Modifié(e) : Walter Roberson le 8 Oct 2019
dydt=-y(1)+1
y(0)=0
  3 commentaires
Sandhiya N
Sandhiya N le 10 Mar 2020
Z=e^-x(x^2+y^2)
Walter Roberson
Walter Roberson le 10 Mar 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

Connectez-vous pour commenter.

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by