Code covered by the BSD License

### Highlights from Sylvester Matrix

Be the first to rate this file! 1 Download (last 30 days) File Size: 2.17 KB File ID: #24124 Version: 1.1

# Sylvester Matrix

### Jos (10584) (view profile)

15 May 2009 (Updated )

SYLVESTER - Sylvester matrix of two polynomials (v3.0, june 2013)

File Information
Description

S = SYLVESTER(P,Q) returns the Sylvester matrix S that is associated with the two polynomial representations P and Q, of degree Dp and Dq, respectively. S is a (Dp+Dq)-by-(Dp+Dq) square matrix. Note that the degree of the polynomial is one less the the number of elements of its representation: degree(P) = numel(P)-1.

SYLVESTER(P,Q, [Mp Mq]) returns a generalization by specifiying the size. The Sylvester matrix S will be a, in general non-square, (Mp+Mq)-by-K matrix, with K being the maximum of (Mp+Dp) and (Mq+Dq).

Examples:
P = [1 2 3 4] ; Q = [6 7] ; % Dp = 3, Dq = 1 ;
M = sylvester(P,Q)
% 1 2 3 4
% 6 7 0 0
% 0 6 7 0
% 0 0 6 7

M = sylvester([1 0 3],[2 4],[3 1])
% -> a non-square sylvester matrix
% 1 0 3 0 0
% 0 1 0 3 0
% 0 0 1 0 3
% 2 4 0 0 0

circulant (File Exchange)

MATLAB release MATLAB 7.6 (R2008a)
Other requirements should work on most ML releases
07 Jun 2013 Jos (10584)

### Jos (10584) (view profile)

The error mentioned by Paul has been fixed in version 3.0

Comment only
03 Jun 2013 Paul

### Paul (view profile)

Does not work but is easily corrected.
Change to : zeros(NQ-2,1)],zeros(NQ-1,1)); etc

Comment only
06 Jun 2013 1.1

fixed serious error resulting in non-square outcomes in some situations