Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1 Before starting with this problem, watch the following video that explains a thought experiment about a concept in human behavior called The Tragedy

Problem 1

Before starting with this problem, watch the following video that explains a thought experiment about a concept in human behavior called The Tragedy of The Commons:

https://ed.ted.com/lessons/what-is-the-tragedy-of-the-commons-nicholas-amendolare

In this problem, you are asked to build a Matlab program that replicates the fisher (fisherman/fisherwomen) thought experiment. The Matlab program should offer the following features:

Briefly explain the rules of the simulation game to the user.

Start the simulation with 12 fish in the pond on day one and asks the user to provide input for how many fish each one of the four fishers will aim to catch for each day.

Allow the user to choose between manually inputting the fishers behavior for each day or to input the fishers behavior for the first day and automatically repeat the same input for the following days.

Considerations for this part:

You should ask the user a question that can be answered with Y or N. You should accept both lower case and upper case responses (hint: use strcmpi).

You should also warn the user if they enter an invalid response (such as yes,no,123,etc) and keep asking them to input Y or N until they do so.

Print out the to the user a daily count of the fish in the pond.

End the simulation if:

The fishers practices are sustainable (yielding to the same number of fish) for two consecutive days. And explain that to the user.

The fishers practices lead to the extension of the fish from the pond. Explain that to the user and print out how many fish remain on the last day where there is not enough fish for all four fishers. (Remember, you cant have negative number).

Reminder: remember to avoid infinite loops. If you end up having an infinite loop, press ctrl+C to stop and abort executing the code.

Extra credit [+50pts]: Save the following data into a text file in a table format: how many fish each fisher attempts to catch everyday and a daily count of the fish in the pond. Your table must contain text headers in the first row and first column.

Self-check: At the end of this document, there are three sample runs of how your simulation screen should look like. To earn full credit, your code should produce the right numbers and have all the functionality sho

image text in transcribed

Problem 1 Before starting with this problem, watch the following video that explains a thought experiment about a concept in human behavior called The Tragedy of The Commons https://ed.ted.com/lessons/what-is-the-tragedy-of-the-commons-nicholas-amendolare In this problem, you are asked to build a Matlab program that replicates the fisher (fisherman/fisherwomen) thought experiment. The Matlab program should offer the following features 1- Briefly explain the rules of the simulation game to the user. 2- Start the simulation with 12 fish in the pond on day one and asks the user to provide input for how many fish each one of the four fishers will aim to catch for each day 3- Allow the user to choose between manually inputting the fishers behavior for each day or to input the fishers behavior for the first day and automatically repeat the same input for the following days Considerations for this part You should ask the user a question that can be answered with 'Y' or N'. You should accept both lower case and upper case responses (hint: use strcmpi) You should also warn the user if they enter an invalid response (such as "yes","no","123",etc) and keep asking them to input Y' or N' until they do so o o 4- Print out the to the user a daily count of the fish in the pond 5- End the simulation if The fishers practices are sustainable (yielding to the same number of fish) for two consecutive days. And explain that to the user a. b. The fishers practices lead to the extension of the fish from the pond. Explain that to the user and print out how many fish remain on the last day where there is not enough fish for all four fishers. (Remember, you can't have negative number Reminder: remember to avoid infinite loops. If you end up having an infinite loop, press ctrtC to stop and abort executing the code Extra credit [+50pts]: Save the following data into a text file in a table format: how many fish each fisher attempts to catch everyday and a daily count of the fish in the pond. Your table must contain text headers in the first row and first column Self-check: At the end of this document, there are three sample runs of how your simulation screen should look like. To earn full credit, your code should produce the right numbers and have all the functionality sho

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

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

What is the major competition for your organization?

Answered: 1 week ago

Question

How accurate is this existing information?

Answered: 1 week ago