how can i draw graph of z^2=x^2-y^2 on matlab
7 次查看(过去 30 天)
显示 更早的评论
采纳的回答
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 个评论
更多回答(2 个)
Salwa Aqeel
2019-10-7
编辑:Walter Roberson
2019-10-8
dydt=-y(1)+1
y(0)=0
3 个评论
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 Center 和 File 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!