P = pascal(N)
P = pascal(N, 1)
P = pascal(N, 2)
P = pascal(..., ClassName)
| 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'). |
| Parameter | Description |
|---|---|
| R | resulting Pascal's triangle matrix. |
pascal generates a Pascal's triangle matrix of size N x N.
pascal(3)
pascal(4, 1)
pascal(5, 2)
| Version | Description |
|---|---|
| 1.15.0 | initial version |