Question: ( Block Matrix ) In this problem, we will construct a matrix of a very particular form. Specifically, it should look like [ I 0

(Block Matrix) In this problem, we will construct a matrix of a very particular form.
Specifically, it should look like [
I 0
B I
]
where the size of B will be determined from keyboard input and will consist of random
integers between 0 and 9. An example of a matrix of this form is
1000000
0100000
0010000
9761000
2190100
2040010
3070001
block_mat Function:
Input variables:
none
Keyboard inputs/screen outputs:
prompts the user for the number of rows and columns to be used in
constructing the matrix B
Output variables:
the block matrix
A possible sample case is:
>> A = block_mat()
Enter the number of rows for the block B: 4
Enter the number of columns for the block B: 3
A =
1000000
0100000
0010000
9761000
2190100
2040010
3070001
4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!