MATLAB: Zero padding in matrix pad zerospadarray Hi, I have a 5×5 matrix and i would like to pad it with zeros such that its size becomes 200×200 and the 5×5 matrix is in the middle of the 200×200. Please help. Best Answer a=magic(5) % exampleb=zeros(200)b(98:102,98:102)=a Related SolutionsMATLAB: Overwrite matrix A with matrix B (which has another size) matrix_b = [zeros(1,57) matrix_a];clear matrix_amatrix_a = matrix_b; MATLAB: Zero padding Refer to padarray function. Related QuestionZero padding or notBuilding a diagonal matrix from another matrix!Matrix padding with zero
Best Answer