Question: MATLAB pls. and no using padarray. This is the code I started with. I just can not figure out how to pad it with zeros.

MATLAB pls. and no using padarray.

MATLAB pls. and no using padarray. This is the code I started

This is the code I started with. I just can not figure out how to pad it with zeros. Matrix A is a random matrix given in the input. With this code, we must extract what it says in the input parameters, but we want the new matrix b to be the same size as matrix A, so we have to somehow pad it with zeros.

mat_B = mat_A([a,b],[c,d]);

2. (Submatrices) In this problem, you will produce a new matrix as a submatrix from a given one, but still padded with zeros to be the same size as the original. . padded_sub_mat Function: Input parameters: an m x n matrix A (note: the dimensions are not passed in) four scalars which represent the first and last row and first and last column of a submatrix to extract Output parameters: a new matrix which is the same size as A which consists of all 0 entries except with a submatrix drawn from A and placed in the appropriate location . A possible sample case is: >> mat B = mat B = padded_sub_mat([1:4 ; 2:5 ; 3:6 ; 4:7], 2, 3, 3, 4) OOOO OOO

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!