Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: ploting a polynomial
Date: Wed, 1 Sep 2010 20:20:20 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 46
Message-ID: <i5mci4$rej$1@fred.mathworks.com>
References: <i5ll0c$54f$1@fred.mathworks.com> <i5lo5n$b0d$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1283372420 28115 172.30.248.38 (1 Sep 2010 20:20:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 1 Sep 2010 20:20:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1244042
Xref: news.mathworks.com comp.soft-sys.matlab:666960

i didnt get that could you explain in a little more detail?
A.^2*m^4+ (2.*A.*C-1)*m^3+ ((2.*A.*B)+(C.^2)+D)*m^2+ 2.*B.*C*m+ B.^2=0
this needs to be solved for m which is dependent on r and t.

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <i5lo5n$b0d$1@fred.mathworks.com>...
> "Snow White" <gulesaman@gmail.com> wrote in message <i5ll0c$54f$1@fred.mathworks.com>...
> > Hello,
> > 
> > I have to observe the behavior of a polynomial:
> > 
> > r=((n-(1/n))^2*sin^2(t))/(2+2n^2-(n+(1/n))^2*sin^2(t)+4cos(t)(sqrt(n^2-sin^2(t)))) 
> > 
> > I have to compute the roots of n or observe the behaviour of n.
> > r=0:0.1:1;t=0:0.3:pi;
> > I have decomposed the equation as follows:
> > 
> > A=transpose((sin(t).^2).*(1+r)-2.*r/(4.*r).*cos(t));
> > B=transpose(((sin(t).^2).*(1+r))./(4.*r.*cos(t)));
> > C=transpose((-2.*(sin(t).^2).*(1-r)+r)./(4.*r.*cos(t)));
> > D=transpose((sin(t).^2));
> > 
> > p= [A.^2 (2.*A.*C-1) ((2.*A.*B)+(C.^2)+D) 2.*B.*C B.^2];
> > 
> > i tried using polyval
> >  y=polyval(p);
> > ??? Error using ==> polyval at 44
> > P must be a vector
> > 
> > p is a mxn matrix
> > 
> > i tried using poly but that requires a nxn matrix. 
> > 
> > Can anyone tell me a way of plotting this polynomial in order to study the behaviour of n by varying r and t ?
> 
> It is not a true polynomial in n by the way, since there are
> negative powers of n involved.
> 
> Use meshgrid to build a grid in n and t. 
> 
> Now, use contour to plot level surfaces of 
> 
> f(n,t) = ((n-(1/n))^2*sin^2(t))/(2+2n^2-(n+(1/n))^2*sin^2(t)+4cos(t)(sqrt(n^2-sin^2(t)))) 
> 
> at different values of r.
> 
> John