Question: The Pascals triangle can be displayed as elements in a lowertriangular matrix as shown below for 6 rows of Pascal's triangular matrix. Write a MATLAB

The Pascals triangle can be displayed as elements in a lowertriangular matrix as shown below for 6 rows of Pascal's triangular matrix. Write a MATLAB program that creates a n n matrix that displays n rows of Pascals triangle. The program must prompt the user to enter the number n of rows in the lower triangular matrix and then create the matrix. (One way to calculate the value of the elements in the lower portion of the matrix is 1 0 0 0 0 0 110 0 0 0 1 2 1 0 0 0 "ij (i-1)! U-1)!(i-j)! 133 1 0 0 146 410 1 5 10 10 5 1 Use the program to create 4 and 7 rows Pascal's triangles. You can use the built-in function factorial () in MATLAB. Only the Pascals triangular matrix (PT) must be displayed in the Command Window. Do Not Use disp or fprintf in your program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
