Domain sketch for multiple variables function
2 次查看(过去 30 天)
显示 更早的评论
How do I sketch the domain of the function f(x,y) =\dfrac{sqrt(y-x^2)}{(1-x^2)}
How to sketch domain D f(x,y)<=0 on Oxy?
This is for my exercise so I really need some help. Thanks in advanced!
0 个评论
回答(1 个)
Amith
2024-8-18
Hi Khoa,
You can make use of the example below to sketch the domain of the provided function:
% Define the range for x and y
x = linspace(-1, 1, 100); % 100 points between -1 and 1
y = linspace(4, 8, 100); % 100 points between 4 and 8
% Create a meshgrid of x and y values
[X, Y] = meshgrid(x, y);
% Calculate the function values
Z = sqrt(Y - X.^2) ./ (1 - X.^2);
% Handle the points where the function is undefined (x = 1 or x = -1)
Z(abs(X) == 1) = NaN;
% Plot the function
surf(X, Y, Z);
xlabel('x');
ylabel('y');
zlabel('f(x, y)');
title('Plot of f(x, y) = sqrt(y - x^2) / (1 - x^2)');
The resulting sketch would look something like this:
Hope this helps!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!