Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is MATLAB Dizzy Shift Write a function called Shifter that takes a 2D array inArray and: i) creates an array circLeft that contains the

this is MATLAB

Dizzy Shift

Write a function called Shifter that takes a 2D array inArray and: i) creates an array circLeft that contains the circular left shift by one position of all the columns of inArray in a 2D array, ii) creates an array called circUp that contains the circular up shift by one position of all the rows of inArray, and iii) creates an array called circ2x that first circularly shifts the columns of inArray by one position, and with the resulting array, shifts all the rows up by one position. The function must operate on a 2D array of any size.

Hint: Array indexing, single colon and end should be used.

Restrictions: For loops, while loops, circshift, and any other internal functions should not be used.

image text in transcribedimage text in transcribed

Restrictions: For loops, while loops, circshift, and any other internal functions should not be used. Ex: inArray = [6,7,4; 10,1,5; 2,9,5]: [ circLeft, circup, circ2x ] = Shifter( inArray ) produces circLeft- 4 1 510 circUp = 10 5 circ2x = 1 5 10 4 Your Function Save Reset MATLAB Documentation 1 function [ circLeft, circup, circ2x ] = Shifter( inArray ) % Your code goes here % 4 5 end

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions