Question: Create a MATLAB script called a2task2.m that computes the following: 1. Create a matrix using the following line of code: A-gallery ('moler',10). Use array subscripting

 Create a MATLAB script called a2task2.m that computes the following: 1.

Create a MATLAB script called a2task2.m that computes the following: 1. Create a matrix using the following line of code: A-gallery ('moler',10). Use array subscripting to assign the 3 column of A to a new vector named vec. 2. Assign the maximum value in vec to a new variable named v_max and the minimum value in vec to a new variable named v_min. Use the repmat command to create a new 2x10 matrix called M such that each row of M is the transpose of vec. 3. 4. Assign the diagonal elements of matrix A to a 10-element column vector named diagM. (Hint: 5. Create a row vector samplesl that contains exactly 99 equally-spaced points ranging from 0 6. Create a row vector samples2 that contains points spaced exactly 0.1 units apart over the there is a MATLAB command that will help you with this) to 100. range of 0 to 2.25

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!