11. The Pascal triangle can be displayed as elements in a lower-triangular matrix as shown on the right. Write a MATLAB program that creates a n×n matrix that displays n rows of Pascal's triangle. Use the program to create 4 and 7 rows Pascal's triangles. (One way to calculate the value of the elements in the lower portion of the matrix is Cij = (i-1)! / ((j-1)!(i-j)!) .) [1 0 0 0 0 0 1 1 0 0 0 0 1 2 1 0 0 0 1 3 3 1 0 0 1 4 6 4 1 0 1 5 10 10 5 1]
Added by Teresa J.
Close
Step 1
The binomial coefficient can be calculated using the formula (i-1) C (j-1), where i is the row number and j is the column number. Here is a simple function that calculates the binomial coefficient: ```matlab function b = binomial(n, k) b = factorial(n) / Show more…
Show all steps
Your feedback will help us improve your experience
Sri K and 58 other Calculus 3 educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Explain how to generate a row of Pascal's triangle.
Sequences, Series, and the Binomial Theorem
The Binomial Theorem
Use Pascal's triangle to expand the binomial. Explain how to generate a row of Pascal's triangle.
If you sum the entries in each row of Pascal's triangle, a pattern emerges. Find a formula that generalizes the result for any row of the triangle, and use it to find the sum of the entries in the 12 th row of the triangle.
Additional Topics in Algebra
Recommended Textbooks
Calculus: Early Transcendentals
Thomas Calculus
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD