![jetblackcap](/avatars/13532.jpg)
jetblackcap
30.03.2020 •
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] )
Solved
Show answers
More tips
- T Travel and tourism Lost in the Catacombs: What to Do?...
- L Leisure and Entertainment What to Bring on a Hike? Essential Items to Pack for a Safe and Enjoyable Adventure...
- S Style and Beauty How Are Eyelash Extensions Applied? All Your Questions Answered...
- F Family and Home Tender Care for Your Parquet: Is it Possible to Clean Parquet?...
- S Society and Politics Is It Fact or Fiction? Let s Talk About Anton Chekhov s Pseudonym...
- S Sport Playing Bowling: Rules and Advice for Novices...
- C Computers and Internet How to Properly Repartition a Hard Drive?...
- A Auto and Moto What Is the Cost of Customs Clearance for a Car in Russia?...
- L Leisure and Entertainment Should You Buy a Ceramic Knife?...
- C Computers and Internet How to easily and quickly disable Firebug in Gmail and Google Docs...
Answers on questions: Computers and Technology
- C Computers and Technology Direction: Identify the parts of Notepad...
- C Computers and Technology Very good morning plz meet. google .com/wmd-jziu-nzy...
- C Computers and Technology What did roald dahl observe when his sister suffered from appendicitis...
- C Computers and Technology Capitalization errors usually are caused by accidental use of the key....
- C Computers and Technology PLEASE URGENT HELP WITH ICT WILL PICK BRAINLIEST! 1. Explain three practical ways ICT has affected you and your immediate society. Your answers should be things that can be related...
- C Computers and Technology What kind of developers design each page or screen with which a user interacts ?...
- P Physics A mass on a spring moves back and forth 3 times every second. What is the frequency of the mass? What is the period of the mass?...
- M Mathematics is g(x)=-(x+1)^2+3 a quadratic function or exponential function??...
- M Mathematics 2) Which expressions are equal to 6^4? A. 10 B. 216 C. 24 D. 6*6*6*6 E. 25 F. 62*62...
- B Biology In the water cycle, the process of occurs between the processes of evaporation and precipitation....
Ответ: