Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: exceeds matrix dimensions,undefined function
Date: Fri, 20 Mar 2009 19:45:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 27
Message-ID: <gq0ro1$3ah$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1237578305 3409 172.30.248.38 (20 Mar 2009 19:45:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 20 Mar 2009 19:45:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1244042
Xref: news.mathworks.com comp.soft-sys.matlab:526510

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);

For this i get the following error when i give some dummy value for n:

??? Index exceeds matrix dimensions.

Error in ==> refractive_index_estimation at 169
            numerator(x,y)=(((n(x,y))-(1/n(x,y)))^2)*((sin(theeta_incident))^2);

If i dont give the dummy value for n i get the following error:

??? Undefined function or method 'n' for input arguments of type 'double'.

Error in ==> refractive_index_estimation at 169
            numerator(x,y)=(((n(x,y))-(1/n(x,y)))^2)*((sin(theeta_incident))^2);


the things is my sole aim is to find the value of n can anyone help me with this?
 please its very urgent..

Bye