pascal
Pascal's triangle
📝Syntax
P = pascal(N)
P = pascal(N, 1)
P = pascal(N, 2)
P = pascal(..., ClassName)
📥Input Arguments
Parameter Description
N size of the Pascal's triangle.
kind (optional) orientation of the triangle: - 0 (default): upright, - 1: flipped horizontally, - 2: flipped vertically.
ClassName (optional) data type of the resulting matrix (e.g., 'double', 'single').
📤Output Arguments
Parameter Description
R resulting Pascal's triangle matrix.
📄Description

pascal generates a Pascal's triangle matrix of size N x N.

💡Examples
pascal(3)
      pascal(4, 1)
      pascal(5, 2)
🔗See Also
galleryvander
🕔Version History
Version Description
1.15.0 initial version
Edit this page on GitHub