Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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, :) =

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions