Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Issue with horzcat
Date: Tue, 14 Apr 2009 03:49:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 25
Message-ID: <gs113d$e6v$1@fred.mathworks.com>
References: <gs10ep$1vr$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 1239680942 14559 172.30.248.38 (14 Apr 2009 03:49:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 14 Apr 2009 03:49:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1136714
Xref: news.mathworks.com comp.soft-sys.matlab:532505


ortPMat=[ortPMat, newPoint]

"Jeff " <jhajewsk@indiana.edu> wrote in message <gs10ep$1vr$1@fred.mathworks.com>...
> I am trying to concatenate 2 matrices horizontally. I have tried doing this two ways
> 
> ortPMat = [ortPMat' newPoint]
> 
> and
> 
> ortPMat = horzcat(ortPMat',newPoint)
> 
> either way I get the error message
> 
> ??? Error using ==> horzcat
> All matrices on a row in the bracketed expression must have the 
>  same number of rows.
> 
> Error in ==> buildCurve at 45
>     ortPmat = horzcat(ortPmat', newPoint);
> 
> However, the dimensions of the matrices are 2X51 and 2X1 so they have the same number of rows. I even have the program display the size of each matrix so I can be absolutely sure. What am I missing?
> 
> Thanks
> 
> Jeff