Question: Write the command that will create matrix A shown in the format below using colon operator for the first row, A = [0 1 2

 Write the command that will create matrix A shown in the

Write the command that will create matrix A shown in the format below using colon operator for the first row, A = [0 1 2 3 4 5 6 7 0 0 7 8 9 0 1 2] if your K-ID = K0789012 Now write the command that will access and extract '4', from first row of 'A', and save it in 'B' Write the command that will add 'B' with element at location (2, 4) of 'A' and save the result in 'C' Extract the row containing your K-Id and save into a new variable called 'kid' What are the dimensions of 'kid'? Hints for HW1.1: Use ': 'operator to create the first row of A then switch to the next row using ': ' and then define the numbers of your K-ID separating them using comma ', ' or spaces eg. A (m: n;1 2] Find the row and column number in which '4' is location in A, then form the index pair to address that location eg. A(m, n) is the element in A on the m^th row and n^th column Add number at location (2, 4) of A to B eg. A(m, n) + B. Access all elements only in the 2^nd row and extract them to 'kid' eg. A(1,: ) will access 1^st row Write down the dimension of 'kid' eg. m times n which means m rows by n columns Specify size/dimension of the matrix 'A' created in HW1.1. Also write the command that will find the size in MATLAB Create an 'ones' matrix of the same size as 'A' and add it to 'A'. Save the result into 'D' Now transpose 'D' and save it onto 'E'. What is the size of matrix 'E'? Get a number from the user, save it in 'f' and subtract 10 from it. Save this result back onto 'f' Use the three basic display and printing statements to print the new value of 'f' consisting of following four phrases The value entered by the user was" Value of f "It was modified to" Final value of f Hints for HW1.2: Mention dimensions of matrix 'A' and verify it using MATLAB eg. [m n] = size(A) Create an ones matrix using ones(m, n) and add it to 'A' Use "'" operator to transpose and find its size Use input() to get number from user and perform necessary operation. Also read question 5 for additional operations that are required for this problem Perform specified operation and use disp(), fprintf and sprintf() to display the same statement

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!