Given a number of row 'n', generate the following pascal's matrix 'p' where spaces are filled by 'zeros'.
number of row, n = 5
p =
0 0 0 0 1 0 0 0 0
0 0 0 1 0 1 0 0 0
0 0 1 0 2 0 1 0 0
0 1 0 3 0 3 0 1 0
1 0 4 0 6 0 4 0 1
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers19
Suggested Problems
-
middleAsColumn: Return all but first and last element as a column vector
647 Solvers
-
Matrix indexing with two vectors of indices
776 Solvers
-
824 Solvers
-
1715 Solvers
-
There are 10 types of people in the world
1289 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!