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

조회 수: 6 (최근 30일)
Rabia Kanwal
Rabia Kanwal 2017년 2월 12일
댓글: Walter Roberson 2020년 3월 10일

채택된 답변

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
darova
darova 2019년 10월 7일
As always, my plesure!
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
Sandhiya N
Sandhiya N 2020년 3월 10일
Z=e^-x(x^2+y^2)
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