Learn R Programming

pracma (version 1.9.3)

pascal: Pascal Triangle

Description

Pascal triangle in matrix format

Usage

pascal(n, k = 0)

Arguments

n
natural number
k
natural number, k <= n<="" code="">

Value

matrix representing the Pascal triangle

Details

Pascal triangle with k variations.

See Also

nchoosek

Examples

Run this code
pascal(5)
pascal(5, 1)
pascal(5, 2)

Run the code above in your browser using DataLab