Plotting an implicit function?

조회 수: 7 (최근 30일)
J
J 2014년 12월 21일
댓글: J 2014년 12월 22일
I have the following equation:
F(x,y) = sqrt( (x^2 * y)^-0.2))
where x and y are positive.
The general shape should look like this:
and I was wondering how I would go about plotting that in matlab, after my unsuccessful attempts with ezplot.
  댓글 수: 1
Matt J
Matt J 2014년 12월 21일
편집: Matt J 2014년 12월 21일
Your equation has a typo in it making it unreadable (a missing exponent after the ^)

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2014년 12월 21일
편집: Matt J 2014년 12월 21일
You could use ezplot, e.g.,
>> F=@(x,y) sqrt((x.^2.*y)-0.2)
>> ezplot(F,[0,2]); shg
  댓글 수: 8
John D'Errico
John D'Errico 2014년 12월 21일
편집: John D'Errico 2014년 12월 21일
Therein lies the problem with the internet. Some random person can post a web site that makes any claim they want. You need to think about what you see and decide if it makes sense, or it is simply a pusher of mental pablum. This is true in general, and of course true in mathematics.
An implicit function only makes sense IF there is an equality in there. Otherwise, you have nothing. So what is F(x,y) equal to? Perhaps 1? 0? pi? 17? Ah! Yes it must be 42.
My point is, you will generally see different curves, depending on the value of that unspecified right hand side. Lacking anything else provided by you, MATLAB makes the perfectly reasonable assumption that it must be zero, and that any necessary constant was built into the function F as provided by you. Any other assumption would simply be wrong.
Since you seem confused, I'll offer a web site ( wikipedia ) that explains what is an implicit function. Of course, then you need to read and decide if what you see is true. I might make note of the form it shows, with an equality and a right hand side of zero. I'm not saying that Wikipedia is perfect of course, hey it could be a lie.
J
J 2014년 12월 22일
Ha, thanks. Yeah, I'm not quite with this here.
I think there's probably some pre-plotting problem, post-reading this. Essentially, I know -- like, reputable-text-print-out know -- what the solution is meant to look like and which points through which it's meant to pass. My task was to plot (along with a heap of other stuff) this function, F, after constructing F in some plottable form. The only reason I thought this would be good to plot, (ezplot-it, no-brains stuff) is because a. I'm an idiot and b. this site (kevinmehall.net/p/equationexplorer) nails it. Like, gets the solutions I'm looking for. Which is this:
https://i.imgur.com/RpE6vsE.png
(I'm only interested in the blue-red divide here. That swooping curve, tending towards infinity.)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by