Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem # 4 : Create a new function file called modify _ matrix.m . Then copy and paste the contents of the create _ matrix.m

Problem #4: 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:
If an entry in B is greater than or equal to zero then multiply it by 5
If an entry in B is less than zero then add 2 to it.
Then use this new function to create a matrix A obtained by modifying the following 3030 matrix B(which
you can copy and paste directly into Matlab). Then find the determinant of A
Warning! When Matlab first reads a function from a file, it stores the function in memory and then uses that
stored function instead of reading the file in subsequent calls to the function. Therefore if after calling a function
vou then make changes to that file those changes will not be made when vou call the function again unless vouCreate 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 2 to it.
Then use this new function to create a matrix A obtained by modifying the following 30\times 30 matrix B (which you can copy and paste directly into Matlab). Then find the determinant of A
B =[7-7-3259-9-442-66-719-2-731022-91-103-2410-4-5;-30-6-0-9-8-6-26-8-3-7-2-5-08-17-6-888-6-6-2344-0-5;-930-1-6-9817328-68-194-7-8-0-2-3-122-9-138-3;993-0-174-1-5-2-06-24556-22-110-6-51-2-8-3-61-8;7-4-74310-41-27510-11-7451010-55-867-6-8-9463;12-570-1-47-5-9-52-5-8-446-9-70-5-02444110-6-3;7-77-5768296-79-1-014-278-648-61-4-02-10-17;4-9-7-8-9-3-1-2-6-10-8-10104-61-8-7-552-68-2-796-17-1;-2-5-53-931-4-4-41-0-2-94-9-5-3-8-5389-82-1-6-1-72;-6-9-0-5-15-992-6-9231-476423-37-5-3-10-1-4-8-97;-5-10-6-724-135-34-3-988-8-4-33-8-2-19-438-597-4;-9-2-4-42759-0-97-92-1-5-3-7-41-0-15-98108-0295;-2-3-106-1-675-6-2-41-48-26-30-961-93-51-5-8-296;-606079-6-8381949-8-1033-501-87-73-65-4-8-6;-1-0-6-5-2-0-4-8-794-6-84611-853919-96713-77;-611-6-311-5-61-1-53-91-5-1959555-70-26-1-86;7-10-10-2-2-2-4-220-9-49109-7-5-29526-10-2-5310-9-46;-8-1049-13-3-40-693-19-6763-4610-939-397-9-75;-6-4-75-9-8-697-6096296-2-73-53-6-852-368-27;1-91-962-4-1135-740458-4-88-987-7

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

What is the main advantage to this tactic?

Answered: 1 week ago

Question

What administrative cost items are associated with this tactic?

Answered: 1 week ago

Question

What is the full-cost budget?

Answered: 1 week ago