From: Olaf on 7 Apr 2010 05:21 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
From: Roger Stafford on 7 Apr 2010 15:16 Olaf <noreplay(a)inder.net> wrote in message <hphiqo$53c$1(a)fuerst.cs.uni-magdeburg.de>... > 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 ---------- There are apparently two differing notions of a "sylvester matrix". The version mentioned in wikipedia: http://en.wikipedia.org/wiki/Sylvester_matrix which is associated with two polynomials is indeed square. However elsewhere on the internet I see references to sylvester matrices in conjunction with diophantine equations which are definitely not square, as for example at: http://homepages.laas.fr/henrion/Papers/6-43-13-16.pdf and http://www2.imm.dtu.dk/pubdb/views/edoc_download.php/3646/pdf/imm3646.pdf Roger Stafford
|
Pages: 1 Prev: unit pulse function Next: Removing 'Inf' points from matrix |