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 21:16:01 +0000 (UTC) Organization: Mitre Corp Lines: 11 Message-ID: <gq112h$799$1@fred.mathworks.com> References: <gq0ro1$3ah$1@fred.mathworks.com> <gq0s8p$8if$1@fred.mathworks.com> <gq0tah$lee$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-02-blr.mathworks.com Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1237583761 7465 172.30.248.37 (20 Mar 2009 21:16:01 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Fri, 20 Mar 2009 21:16:01 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 2318 Xref: news.mathworks.com comp.soft-sys.matlab:526527 "Snow White" <gulesaman@gmail.com> wrote in message <gq0tah$lee$1@fred.mathworks.com>... > it is an m by n matrix and both are positive integers. n is a number that is calculated at row x and column y position. So it is not a function > > "Matt Fig" <spamanon@yahoo.com> wrote in message <gq0s8p$8if$1@fred.mathworks.com>... > > n better be an m-by-n matrix if you are requesting the element n(x,y). Both x and y also should be positive integers with x<=m and y<=n. > > > > It seems as though you are thinking of n as a function of x and y. In that case you will have to define the function before calling it. See the help for anonymous functions. OK then, what is the size of n and what values of x and y are you using when you get the error message? That should give you a hint.