Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATlab assistance! Homework 5 - Arrays Function Name: sportsBall Inputs 1. 2. 3. (char) An NxN array of words (char) A word to find (char)

image text in transcribedimage text in transcribedMATlab assistance!

Homework 5 - Arrays Function Name: sportsBall Inputs 1. 2. 3. (char) An NxN array of words (char) A word to find (char) A character to replace all of the characters in the word Outputs 1. (char) An NxN array with the word that was being found replaced with the character Background As a Georgia Tech engineering student, you aren't the most familiar with sports. You're pretty sure that the hockey final (also known as the World Series) is at Wembley in Atlanta between the Browns and the Yankees next Monday, but some of that could be wrong. Isn't Michael Phelps their star wide quarterback who's known for his awesome serve spike? Your friends keep calling you out for not knowing anything about sports, so you eventually give up on sports, and sit down with a word search. When you open the page, the subject of the puzzle is--you guessed it-sports Function Description Given an NxN character array, find the given sports word. This function will take in three inputs an array, a word to look for, and a character to change that word to. "Cross out" the word in the puzzle by replacing it with the given character, and then output the modified puzzle Example: puzzle -smnjk' piano "ohana randm tests' word 'sport character - '# puzzleUpdatedsportsBall (puzzle, word, character) puzzleUpdated 4mnjk' #iano ' #hana '#andm ,#ests' ] Notes: You don't have to consider diagonals, but must consider the word horizontally forwards and backwards and vertically forward and backwards (the word can read up, down, left, or right) . Homework 5 Arrays The word may exist once or not at all. If the word does not appear, the input and output arrays should be identical. . If your solution recognizes words that span across several lines, i.e. recognizing 'sports' in the puzzle below, that is okay. This edge case will not be tested for grading. abcspo rtsdef Hints: Think about how you can use transposing and linearizing to check for the word in the different directions. . You will find the reshape () and strrep() functions useful

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

Students also viewed these Databases questions

Question

How to solve maths problems with examples

Answered: 1 week ago