Question

I need Help creating a MATLAB function that will select a certain food someone wants. There...

I need Help creating a MATLAB function that will select a certain food someone wants. There are 5 people and the function is supposed to let one person pick from a list of food and each person can only pick once and a certain food cannot be repeated

The order is

1. Jamie

2. John

3. Paul

4. Joe

5. Ryan

and the list of available foods are { Pizza, Wings, Fries, Burgers, Chicken, Rice, Salad}

0 0
Add a comment Improve this question Transcribed image text
Answer #1

foodList = {'Pizza'; 'Wings'; 'Fries'; 'Burgers'; 'Chicken'; 'Rice';'Salad'};
customerList = {'Jamie';'John';'Paul';'Joe';'Ryan'};

function out = distributionFunction(foodList,customerList)
n= size(customerList);
for i=1:1:n
customerName = customerList{i}
foodName = foodList{i}
end;
end;


distributionFunction(foodList,customerList);

Add a comment
Know the answer?
Add Answer to:
I need Help creating a MATLAB function that will select a certain food someone wants. There...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • i really need help with the graphs Driving Can Be Dangerous to Your Health: An Interrupted...

    i really need help with the graphs Driving Can Be Dangerous to Your Health: An Interrupted Case Study in Physiology Phil Stephens Department of Biology Villanova University Part 1-The Grandparents Arrive Dave pulled the cell phone out of his pocket, cursing himself for not putting it on vibrate. The children, Jason and Laura, were both asleep, and he knew that the rest of the day would not be fun if they were awakened from their naps. "Hi, Dave. We're just...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT