Question: For question 19 I got the code: A = eye(6); For the second part I got this code: A(:, 5:6) = 2; A(4:6, :) =

 For question 19 I got the code: A = eye(6); For

For question 19 I got the code: A = eye(6);

For the second part I got this code:

A(:, 5:6) = 2; A(4:6, :) = 3;

How can i use the colon code in matlab with a display function to get the result I need for the second part? (I want to run it so it displays the answer) Please also show a printscreen from command window result.

19. Use the eye command to create the array A shown on the left below, Then, using the colon to address the elements in the arrays, change A to be like the one shown on the right. A=100000010000001000000100000010000001 A=100022010022001022333122333010333001 20. Create a vector v=[1,2,3,,35] with 35 elements. Then, use the reshape function to create a 57 matrix in which the first row is the numbers 1234 567 , the second row is the numbers 891011121314 , the third row is the numbers 15 through 21 , and so on. 21. Create a 33 matrix A in which all the elements are 1. Then, reassign A to itself such that A will become: A=111000111000111000000111000111000111

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!