Question: Develop, debug, and test your own M-file function to switch the rows of a matrix using a permutation matrix. The first lines of the function
function B = permut (A, r1, r2) SS% permut Switch rows of matrix A% with a permutation matrix% B = permut( A,rl,r2) SS% input% A = original matrix% r1, r2 = rows to be switched% output:% B = matrix with rows switched.
Include error traps for erroneous inputs (e.g., user specifies rows that exceed the dimensions of the original matrix)?
Step by Step Solution
3.40 Rating (159 Votes )
There are 3 Steps involved in it
The objective is to switch the rows of a matrix using a permutation matrix with the help of Matlab c... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
1019-B-C-F-D-F(1420).docx
120 KBs Word File
