Question: Create a new function file called modify_matrix.m. Then copy and paste the contents of the create_matrix.m file into this new file, and change the name
| Create a new function file called modify_matrix.m. Then copy and paste the contents of the create_matrix.m file into this new file, and change the name of the function in the first line to modify_matrix (instead of create_matrix). By further modifying this new file, write a function that will output a matrix A obtained by modifying an input matrix B in the following way: 1. If an entry in B is greater than or equal to zero then multiply it by 5 2. If an entry in B is less than zero then add 6 to it. Then use this new function to create a matrix A obtained by modifying the following 30??30 matrix B (which you can copy and paste directly into Matlab). Then find the determinant of A Thank you!!! B = [-10 5 -3 -7 -10 6 -6 -3 -7 -3 0 3 1 -8 -4 -3 5 5 6 -3 -4 -1 -3 6 -5 8 2 -9 2 4;-5 -7 -2 -3 -2 1 -6 -7 -5 -2 4 8 -6 -0 3 -7 -8 -5 8 -4 8 3 -7 8 -6 -9 1 -5 7 7;-1 7 5 1 9 -3 -7 8 -6 6 1 -2 1 -7 -1 -10 3 9 -8 4 -2 2 0 2 -8 5 -10 3 8 -3;-5 5 -9 -4 -1 5 2 4 -4 -7 8 10 2 -8 -4 8 -6 1 -8 3 3 -7 2 -8 -8 -5 3 5 -3 4;-9 -3 -5 8 -2 -1 -2 -5 3 -3 -2 -2 -9 10 3 -1 -1 7 -9 9 10 7 2 -3 4 4 10 7 -1 9;-8 -2 -6 -0 6 1 8 -3 1 7 -6 4 4 5 10 4 -8 -2 -1 7 8 6 -10 -3 4 -7 -9 -10 1 -8;-5 6 -10 9 -2 -1 6 -7 -7 -5 1 4 -3 5 8 4 6 -10 -3 -6 -7 -5 3 -4 -1 2 -9 -1 2 5;2 6 -0 -1 9 10 7 7 -3 -2 -5 -7 2 -6 -2 5 -2 4 7 6 -9 -8 -8 0 -9 -7 -8 2 -4 -4;8 7 -0 8 1 2 0 4 -7 3 -10 -9 8 6 2 -5 6 -8 1 7 -8 -7 -4 5 -8 -6 2 2 5 -6;2 7 -6 -10 -4 -1 4 -3 2 -3 -7 1 2 -3 3 8 6 10 -3 7 -1 1 -5 9 -9 2 9 -10 -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-6 -10 2 10 2 9 0 -4;-10 -0 -8 3 -8 2 6 -3 1 2 -2 -4 -10 -5 -3 7 -5 -2 -4 7 4 7 3 4 -9 -2 4 0 -0 1;2 5 6 7 0 7 9 -9 -6 6 5 8 -5 4 -5 3 7 1 10 5 -6 -9 6 -4 8 10 7 -9 2 -1;-6 -1 6 -2 3 -6 -4 3 -7 -5 -3 -9 -0 0 -5 -0 -5 5 0 -5 -1 -0 -7 -10 8 8 0 10 8 4;9 -3 7 -3 -7 -7 -7 -2 2 -1 -5 -4 -10 -4 8 3 -4 2 -7 -2 5 0 -3 -1 8 3 2 -4 3 6;-8 -3 -8 4 3 -2 8 -8 7 -10 -7 -6 -1 6 7 -5 4 1 6 3 -4 -3 3 0 8 -7 -6 -1 -4 5;-6 2 6 -8 9 6 6 8 8 5 -4 7 9 8 -8 0 -5 4 3 0 1 6 -3 3 8 4 -7 6 -9 -6]
|

Create a new function file called modify matrix.m. Then copy and paste the contents of the create matrix.m file into this new file, and change the name of the function in the first line to modify matrix (instead of create_matrix). By further modifying this new file, write a function that will output a matrix A obtained by modifying an input matrix B in the following way: 1. If an entry in B is greater than or equal to zero then multiply it by 5 2. If an entry in B is less than zero then add 6 to it. Then use this new function to create a matrix A obtained by modifying the following 30 30 matrix B (which you can copy and paste directly into Matlab). Then find the determinant of A B=[-10 5-3-7-10 6-6-3-7-3031-8-4-3556-3-4-1-36-582-924.-5-7-2-3-21-6-7-5-248-6-0 3-7-8 -5 8-48 3 -78-6-91-5 77;-17519-3-7 8-661-21-7-1-1039-84-2202-85-10 3 8-3;-55-9 -4-15 24-4-7810 2 -8 -48-61-833-7 2-8 -8-5 3 5 -3 4;-9-3-58 -2-1-2-5 3 -3 -2 -2-9 103-1-17-99 1072 -3 44 107-19;-8 -2-6-0618-3 17-6445 104-8 -2-1786-10 -3 4-7-9-101-8;-56-109 -2-16 -7-7-514-3 5846-10 -3-6-7-5 3-4-12-9-125:26-0-1 9 1077 -3 -2-5 -72-6-25-2476-9-8-80-9 -7-82-4-4;8 7 -081204 -7 3-10 -9 862-56-817-8 -7-4 5 -8-6225-6;27-6-10-4-14-32-3-712-3 3 8 6 10 -37-11-59-929 -10 -5 7;5 7-69-1 -2-66-2-108 -514-4192230-8-2-6 396-8 -9-1;-8-1-6 591-4-8-57-963-09-5-75-2 8 10 -3 -45-7-5 -39 8 6;4-0-69 101-7-9-391-7-10 10-797-7244 -1 10 2 -57-2-4 -19;3 8 -1-5-9-2-175-3-6 -3 -44 10 8 10-9-7836-9988-31 -8 -4;0 -25 -8-9-1-9 2 -2-8000-6362-4 10 -4 4-3 9-100-1339-9;8 9-10-863 -3 -10 -1-4-4-01-89 3-8-3699-2-6-27 2 6 -32-6;-78-942 1-10 -9 3-8-21-4-25 2-8-2352-91910-18 -7 3 8;5 6 -668-9 -59-2-61568-3 107-3 4 -5-77-0-652-1-39 -5;967-60-571-2-361652-9 -8 -42-3-7 3-4-9-8-10118 7;10 -5-5 -2-4-10 -4 10-91-6-9007-41-7-0-425 10 -2 -3772-5 6;24-4 -1-9-77-7 10-10-6451 10 3-175-8 9-8-0 -2417-3-7 -2;10 7-109 8 53-1-7 -268-105-9316-1754-4-38 -5-10 -9-6 -3;6 10 10 -4-4 74 -1-9 0 6 1-107-8-772-9-1 1 6 6 109-29-0-4 4:12-0 7 6_7 8 9 7 1 5 5 6-2-4-244-8-10 5-2-6-10 2 10 290-4;-10 -0-83-826-3 12-2-4-10 -5-3 7-5 -2-474734-9-240-01;2 567079-9-6658-54 -5 3 7 1 105 -6-96-4 8 107-9 2-1;-6-16-2 3-6-4 3-7 -5-3 -9 -00-5-0 -550-5 -1-0-7-10 8 8 0 10 8 4;9 -3 7 3 -7-7-7-22-1 -5-4 -10-48 3 -4 2-7-250-3-1832-4 3 6;-8 -3 -843 -28 -8 7-10-7-6-167-54163 4 -3308-7-6-1 -45;-626-8966885-4798-80-543016-3384-76-9-6]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
