Generates a Pyramid Pattern that Processes a Positive Odd Integer Using MATLAB

$29.00$19.001866 reads

Question

a) Generate the following Pyramid pattern, that processes a positive, odd integer N received from the user and produces an N by (2* N - 1) array containing a pyramid of numbers. For example:

When N = 5              

                 

b) Generate the following pattern, where we need to processes a positive, odd integer N received from the user and produces an N by N array containing numbers that reflect along the main diagonal. For example:

   When N = 5

                       

Note: Do not enter the individual values manually; you have to use matrix functions. And see that your program works for all other possible values of N.

Summary

This question belongs to MATLAB software and discusses about application of MATLAB in mathematics to generate a pyramid pattern that processes a positive odd integer.

Answer is in MATLAB format

 

Add to Cart