Computers and Technology

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] )

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:40, Morghurley2000
"it security policy enforcement and monitoring" respond to the following: describe how monitoring worker activities can increase the security within organizations. describe the rationale that managers should use to determine the degree of monitoring that the organization should conduct. explain the extent to which you believe an organization has the right to monitor user actions and traffic. determine the actions organizations can take to mitigate the potential issues associated with monitoring user actions and traffic.
Answers: 3
image
Computers and Technology, 23.06.2019 12:00, lyn94
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, ryleerose255
Idon’t understand the double8 coding problem. it is java
Answers: 1
image
Computers and Technology, 23.06.2019 21:00, tiffg2588
Will this setup result in what kathy wants to print?
Answers: 2
Do you know the correct answer?
Create a new function file and write a function NewArray = ShiftRows_ubitname( OldArray ) that shift...

Questions in other subjects: