Using MATLAB, please read question well
function found = stPaddysFeast(search,ind)
i=0;
while ~(strcmp(search(ind(1),ind(2)).food,'corned beef'))
if
(strcmp(search(ind(1),ind(2)).food,'potato'))
i=i+1;
end
ind=search(ind(1),ind(2)).next;
end
found=sprintf('I found %d potatoes before I reached the corned beef
at position (%d,%d).',i,ind);
Function Name: stPaddysFeast Example search- Inputs 1 (struct) A MxN structure array 2. double) A...
Function Name: zoomZoom Inputs: 1. (double) An Nx5 array of scooters' speeds at various times 2. (double) The time at which you want to find the scooters' speeds Outputs: 1. (double) A 1x5 vector of scooters' speeds at the given time Background: Scooter go zoom zoom! Function Descripti on : You will be given an array with times in the first column, and speeds of different electric scooters in columns 2-5 that correspond to those times. Use spline interpolation or...
MATLAB code help! Function Name: jackSparrow Inputs: 1. (double) A 1x2 vector describing your hand 2. (double) A 1x2 vector describing Jack Sparrow's hand 3. (double) A vector with the next cards to be drawn from the deck Outputs: 1. (char) A description of the game outcome Background: You're out at sea with the infamous Jack Sparrow, and it's a pretty calm day. Without anything better to do, Jack Sparrow challenges you to his favorite card game: BlackJack (Sparrow edition)...
MATLAB code help!!! Function Name: sportsStats Inputs: 1. (double) An Nx5 array representing the stats of different football teams 2. (double) The cutoff for total penalties Outputs: 1. (double) An Mx5 array representing the updated stats Background: You just finished watching the Patriots defeat the Rams in Super Bowl LIII, and you just can't wait for the next season to start. However, instead of waiting around for the next football season, you decide to take matters into your own hands...
C programming The program will require the following structure: struct _data { char *name; long number; }; The program will require command line arguments: int main(int argv, char **argc) { Where argv is the number of arguments and argc is an array holding the arguments (each is a string). Your program must catch any case where no command line arguement was provided and print a warning message (see below). You MUST include/use the following functions, defined as follows: int SCAN(FILE...
using MATLAB Function Name: hahaYes Inputs: 1. 2. (char) The filename of an Excel file containing word counts from various works (cell) A 2xN cell array of words and how many times they occur in the unknown work Outputs: 1. (cell) A 1x3 vector of the closest matches to the unknown work Background You do not understand this reference Function Description: The Excel file that you are given contains data on how many times certain words appear in different works...
matlab Example: Function Name: battleFormation formation([3 5 11, formation1.txt) Inputs: (double) 1xN vector of the number of soldiers each line 2. (char)A file name, indluding extension, for the output file group number Formation1.txt: 1 Line 1 has the following line up: e 1 1 1 0 File Outputs: 21 Line 2 has the folloOwing line up: 1 1 1 1 1 1. A text file showing the soldiers formations 3 Line 3 has the following line up: e e 1...
matlab Example: Function Name: battleFormation formation([3 5 11, formation1.txt) Inputs: (double) 1xN vector of the number of soldiers each line 2. (char)A file name, indluding extension, for the output file group number Formation1.txt: 1 Line 1 has the following line up: e 1 1 1 0 File Outputs: 21 Line 2 has the folloOwing line up: 1 1 1 1 1 1. A text file showing the soldiers formations 3 Line 3 has the following line up: e e 1...
Function Name: fluxCapacitor Inputs: 1. (double) The current year 2. (double) Destination year 3. (double) Speed, in miles per hour Outputs: 1. (char) String stating whether you’re going back or forward into the future Background: Doc Brown has invited you on an adventure through time. As you two hop into the time-travelling Delorean, he inputs the current year and the destination year. As the Doc steps on the gas, he reminds you that you can’t interact with ANYONE, or you’ll...
this is advance java Monster ARray Summary: Write a program that shows the path of an imaginary monster moving through a two dimensional array trying to "eat" the highest values in the array. As the monster goes, it leaves a trail behind it. Imagine a 40x40 array, displayed like this, where Os are printed as periods (dots), and non-zero valués are printed as normal. Then, place the values 2 through 9 randomly on the array. The rest of the document...
MATLAB code help! Function Name: chemTimer Inputs: 1. (double) The current position of the hour hand 2. (double) The current position of the minute hand 3. (double) A positive or negative number of minutes Outputs: 1. (double) The position of the hour hand after the specified time 2. (double) The position of the minute hand after the specified time Background: Oh no, you were running late to your Chem lab and completely forgot your reaction timer! It's a good thing...