Filter löschen
Filter löschen

Graphing a two variable limit

1 Ansicht (letzte 30 Tage)
Stephen
Stephen am 6 Okt. 2022
Kommentiert: Chunru am 7 Okt. 2022
Hi, I am new to MATLAB and I can't seem to figure out how to graph a two variable limit like:
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.
Thanks in advance for any help that is given!
  1 Kommentar
Torsten
Torsten am 7 Okt. 2022
Bearbeitet: Torsten am 7 Okt. 2022
What do you want to graph here ? The function is defined and continuous at (0,1) with value (acos(0))/1 = pi/2.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Chunru
Chunru am 7 Okt. 2022
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 Kommentare
Stephen
Stephen am 7 Okt. 2022
I understand that, I was just asking the wrong question originally and got the correct answer anyways, which is my fault on my part. Thank you both for the help anyways, sorry about the confusion!
Chunru
Chunru am 7 Okt. 2022
The comment-out code above is good when acos become complex.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by