subject

Create a new function file and write a function NewArray = ShiftRows_ubitname( OldArray ) that shifts the rows of an arbitrary 3-row array from rows arrangement 1, 2, and 3 to the arrangement 3, 1, and 2. For example, if the OldArray is [1 1 ; 2 2 ; 3 3], the NewArray is [3 3 ; 1 1 ; 2 2]. Your function calculations must do the following: Test that the number of rows in OldArray is 3 using an if-end structure. For any number of rows other than 3, the function must throw a message 'Number of rows in the input array must be 3' and assign a value of -1 of NewArray. Otherwise, the function must shift the rows of OldArray from 123 to 321 and assign it to NewArray. No looping is required. Contain the appropriate H1 and help text lines. Test your function in the command window as >> ShiftRows_ubitname( [1 1 ; 3 3] ) >> ShiftRows_ubitname( [1 1 ; 2 2 ; 3 3] )

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:30
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
question
Computers and Technology, 23.06.2019 09:10
Effective character encoding requires standardized code. compatible browsers. common languages. identical operating systems.
Answers: 1
question
Computers and Technology, 24.06.2019 07:30
John recently worked on a project about various programming languages. he learned that though procedural language programs are useful, they have disadvantages too. what is a disadvantage of programs written in procedural languages? a. programs do not represent data complexity. b. programs take more time to execute. c. programs are prone to security threats. d. programs do not interface with multiple platforms.
Answers: 3
You know the right answer?
Create a new function file and write a function NewArray = ShiftRows_ubitname( OldArray ) that shift...
Questions
question
Mathematics, 06.07.2021 17:50
question
Mathematics, 06.07.2021 18:00
question
Mathematics, 06.07.2021 18:00
question
Mathematics, 06.07.2021 18:00
question
Mathematics, 06.07.2021 18:00
question
Mathematics, 06.07.2021 18:00