Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pascal

MATLAB pascal function


Description

Generate Pascal matrix.

Usage

pascal(n, k=0)

Arguments

n

numeric scalar specifying order

k

numeric scalar specifying desired option. Valid values are 0, 1, or 2

Details

Specifying k=0 returns symmetric positive definite matrix with integer entries taken from Pascal's triangle.

Specifying k=1 returns the lower triangular Cholesky factor (up to the signs of the columns) of the Pascal matrix.

Specifying k=2 returns a cube root of the identity matrix.

Value

Returns matrix of order n according to specified option k.

Author(s)

Examples

pascal(4)
pascal(3, 2)

matlab

MATLAB emulation package

v1.0.2
Artistic-2.0
Authors
P. Roebuck
Initial release
2014-06-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.