Graphing a two variable limit
1 次查看(过去 30 天)
显示 更早的评论
Hi, I am new to MATLAB and I can't seem to figure out how to graph a two variable limit like:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1148105/image.png)
I've seen answers on how to create a two-variable function, or how check the limit for continuity, but I hope to see it graphed in relation to
. I have gotten errors saying that the function is too complex, or that Z must be a matrix, and I have no clue how I should handle those kinds of errors.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1148110/image.png)
Thanks in advance for any help that is given!
1 个评论
采纳的回答
Chunru
2022-10-7
x= -0.5:.01:0.5;
y = 0.5:.01:1.5;
[xx, yy] = meshgrid(x, y);
zz = acos(xx./yy)./(1+xx.*yy);
%zz = nan(size(xx));
% idx = abs(xx./yy)<=1;
% zz(idx) = acos(xx(idx)./yy(idx))./(1+xx(idx).*yy(idx));
% whos
contourf(xx, yy, zz);
hold on
plot(0, 1, 'rd')
4 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!