Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!newsfeed00.sul.t-online.de!t-online.de!news.mind.de!news.cs.uni-magdeburg.de!not-for-mail
From: Olaf <noreplay@inder.net>
Newsgroups: comp.soft-sys.matlab
Subject: Sylvester matrix
Date: Wed, 07 Apr 2010 11:21:28 +0200
Organization: University of Magdeburg, Germany
Lines: 29
Message-ID: <hphiqo$53c$1@fuerst.cs.uni-magdeburg.de>
NNTP-Posting-Host: imat46.mb.uni-magdeburg.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
X-Trace: fuerst.cs.uni-magdeburg.de 1270632088 5228 141.44.146.46 (7 Apr 2010 09:21:28 GMT)
X-Complaints-To: abuse@cs.uni-magdeburg.de
NNTP-Posting-Date: Wed, 7 Apr 2010 09:21:28 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
Xref: news.mathworks.com comp.soft-sys.matlab:624163

Hello,

I'm trying to solve the diophantine equation using the sylvester matrix.
On matlab's homepage I found a m-script sylvester.m

The core of this is:

function M = sylvester(P,Q)
...
NP = numel(P) ;
NQ = numel(Q) ;
...
MP = toeplitz([P(:) ; zeros(NQ-1,1)],zeros(NQ,1)) ;
MQ = toeplitz([Q(:) ; zeros(NP-1,1)],zeros(NP,1)) ;
M = [MP MQ].' ;

Well, the sylvester matrix shouldn't be square? which isn't here (from
doc of this):

P = [1 2 3 4] ; Q =  [6 7] ;
size( sylvester(P,Q) )

ans =
     6     5

What's wrong here? Do I miss something here?

Thanks,
Olaf