14.09.2015 Views

Matvec Users’ Guide

Matvec Users' Guide

Matvec Users' Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

56 CHAPTER 9. MACRO PACKAGES<br />

Row 1 1 2 3<br />

Row 2 2 3 0<br />

Row 3 3 0 0<br />

> hankel([1,2,3],[3,4,5])<br />

Col 1 Col 2 Col 3<br />

Row 1 1 2 3<br />

Row 2 2 3 4<br />

Row 3 3 4 5<br />

9.3.4 vander<br />

vander(C) returns the Vandermonde matrix whose second to last column is C. The j-th column of a Vandermonde<br />

matrix is given by A(∗, j) = C ( n − j). For example,<br />

> package("special_matrix");<br />

> vander([1,2,3])<br />

Col 1 Col 2 Col 3<br />

Row 1 1 1 1<br />

Row 2 4 2 1<br />

Row 3 9 3 1<br />

9.3.5 hadamard<br />

hadamard(k) return the Hadamard matrix of order n = 2 k .<br />

not available<br />

9.3.6 pascal<br />

pascal(n) returns the Pascal matrix of order n: a symmetric positive definite matrix with integer entries,<br />

made up from Pascal’s triangle. For example,<br />

> package("special_matrix");<br />

> pascal(3)<br />

Col 1 Col 2 Col 3<br />

Row 1 1 1 1<br />

Row 2 1 2 3<br />

Row 3 1 3 6<br />

9.3.7 toeplitz<br />

toeplitz(C) returns a symmetric (or Hermitian) Toeplitz matrix; whereas toeplitz(C,R) returns a nonsymmetric<br />

Toeplitz matrix having C as its first column and R as its first row. For example,<br />

> package("special_matrix");<br />

> toeplitz([1,2,3])<br />

Col 1 Col 2 Col 3<br />

Row 1 1 2 3<br />

Row 2 2 1 2<br />

Row 3 3 2 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!