Question: This is a homework for MATLAB. Please answer using MATLAB functions and parameters. The answers are to be submitted as a .m script. Don't just

This is a homework for MATLAB. Please answer using MATLAB functions and parameters. The answers are to be submitted as a .m script. Don't just list final answers. Search this paragraph to find other similar questions to answer please.This is a homework for MATLAB. Please answer using MATLAB functions andparameters. The answers are to be submitted as a .m script. Don't

8 Answers are to be reported as pX= where X is the problem number. * For example the answer to problem i should be reported as pl- $ if it is a single part question, and pla= if it is a multipart $ question. This is how to report your answer for a single part question pl = sind (180); * This is how to report your answer for a multi-part question p2a = exp(-2*pi); p2b = fix (2*pi); p2c = mean (1:5); p2d = 'my answer is ...'; Problem 3: Create 2-dimensional matrix matA using the following commands: matA = 1:100; matA = abs(fix(100*sin(mat))); matA = reshape(matA,10,10). Perform the following exercises with matA: a) Set p3a to be equal to matA. Use logical indexing to replace the maximum values of each column in matrix p3a with 100. b) Set p3b to be equal to matA. Use logical indexing to replace the maximum values of the entire matrix p3b with 1000. c) Use function isprime to check whether any element in matA is a prime number. Put the answer in a logical number p3c. d) Identify the elements in matA that are the prime numbers. Use linear indexing to report the answer in a column vector p3d

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!