Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: exceeds matrix dimensions,undefined function
Date: Fri, 20 Mar 2009 23:14:06 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <gq17vu$mni$1@fred.mathworks.com>
References: <gq0ro1$3ah$1@fred.mathworks.com> <gq11me$kfv$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1237590846 23282 172.30.248.35 (20 Mar 2009 23:14:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 20 Mar 2009 23:14:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1244042
Xref: news.mathworks.com comp.soft-sys.matlab:526543

I dont quite get your point. n(x,y) is one value that is determined at an image pixel location of x,y and so are the other values determined for that pixel location. I know rho and theeta_incident i have to find n(x,y).

"Steven Lord" <slord@mathworks.com> wrote in message <gq11me$kfv$1@fred.mathworks.com>...
> 
> "Snow White" <gulesaman@gmail.com> wrote in message 
> news:gq0ro1$3ah$1@fred.mathworks.com...
> > Hello,
> >
> > I want to find the value of n(x,y), I have the other values and following 
> > is the code that i have written, i can not mathematically filter out 
> > n(x,y):
> >
> > numerator(x,y)=(((n(x,y))-(1/n(x,y)))^2)*((sin(theeta_incident))^2);
> > 
> > denominator(x,y)=2+((2*(n(x,y)^2))-((n(x,y))+(1/n(x,y))^2))*((sin(theeta_incident))^2)+(4*(cos(theeta_incident)))*(sqrt((n(x,y)^2))-((sin(theeta_incident))^2));
> >            rho=numerator(x,y)/denominator(x,y);
> 
> Write a function that accepts a vector of M parameters, where M is the 
> number of elements you want your n matrix to contain, as well as whatever 
> other values it needs to calculate a value for numerator.  Have your 
> function use those parameters to construct the matrix n and compute the 
> difference between the calculated value of numerator and the measured values 
> that you have for numerator.  Then call FSOLVE to find M parameters that 
> make the difference the zero matrix.
> 
> -- 
> Steve Lord
> slord@mathworks.com 
>