```Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Solving 15 nonliear equations and 15 unknowns
Date: Mon, 28 May 2012 12:33:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <jpvra3\$j8h\$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1338208387 19729 172.30.248.48 (28 May 2012 12:33:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 28 May 2012 12:33:07 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:769211

alzack <zaki.yz@gmail.com> wrote in message <a0910487-918e-4e3b-92e1-99c4eaa202ab@s9g2000vbg.googlegroups.com>...
> ??? Error using ==> mtimes
> Inner matrix dimensions must agree.
> Error in ==> f2 at 18
> Y(12)=[3 0 2 2 3 3 1 0 1 1 1]*x(1:11)'-0.041121;
- - - - - - - - - -
Since your x0 estimate is a column vector, presumably the x which 'fsolve' sends to @f2 will also be a column vector.  The fact that 1:11 is a row vector does not make x(1:11) a row vector so it is incorrect to take its transpose x(1:11)' as you have done.  That is also true of x(1:8)' and x(1:10)' in Y(13) and Y(14).

That is what the error message is trying to tell you:

"??? Error using ==> mtimes
Inner matrix dimensions must agree.
Error in ==> f2 at 18
Y(12)=[3 0 2 2 3 3 1 0 1 1 1]*x(1:11)'-0.041121;"

Roger Stafford
```