Let us worry about your assignment instead!

We Helped With This MATLAB Programming Assignment: Have A Similar One?

SOLVED
CategoryProgramming
SubjectMATLAB
DifficultyCollege
StatusSolved
More InfoPay Someone To Do My Matlab Homework
222111

Assignment Description

MATLAB Lab # 3 - Homework

General Requirements:

READ THE FOLLOWING VERY CAREFULLY

      Pseudocode or flowchart. 

o   For this assignment, you must submit a pseudo-code or flowchart for each part. 

o   It is the policy of myself and the FYELIC that if you do not have pseudo-code or a flowchart to show you’ve put thought into the logic, you will not get help on writing the actual code.  

§  You can get some help on the logic but you have to make a first attempt on your own.  

o   Your pseudo code does not have to be perfect. 

§  It just needs to be a decent attempt at solving the problem. Your final code may vary somewhat or even entirely from the pseudocode. Simply update it.  

o   Handwritten is acceptable if legible

§  If not, use a word or drawing program to assist

      This is not a group assignment. It is an INDIVIDUAL one. 

o   But I do understand if you work together. Limit it to a pair.

o   You must turn in your own code o You must acknowledge who helped you in the Title block. 

§  If it was a student, name them. 

§  If it was a Red Shirt, just say “Red Shirt” and their first name if you recall it. The same goes for if you get help from one of our TAs. 

      INCLUDE comments in your code

o   Code is not accepted if it is not annotated to help us understand what you are trying to do in your code. 

       

Part 1 – Tic Tac Toe

Write a program that allows 2 players to play a game of Tic Tac Toe. Within that program, you will need to write and use 3 functions to determine which player starts, update a plot of the game board after each player’s move, and determine if a player has won the game.

Requirements:

      You may work with one (1) partner on this homework assignment. 

o If you do, include their name in a comment on the second line of your code. 

      Create a high detail “plan” of your program before you sit down to code o IE write your pseudo code or flowchart first, not after o Don’t forget you’ll have multiple functions involved

o If you come to me with programming questions about “How do I write the code for this assignment?” without any attempt at planning your logic, you get a 0 on the assignment. 

Objectives:

      Write a MATLAB program (in an m-file) to play an interactive Tic-Tac-Toe game:

o each player is prompted for his/her marker position  o followed by the program “plotting” his/her marker  

      Create a friendly user interface to gather player moves

      Use a loop to keep the game moving between two players

      Use one of the built-in random number generation functions to simulate a coin toss o This will determine which player will go first

      Write a function that reads the game board for a winning row (CheckWin) o This will determine if a win has occurred

      Write a function that plots an up to date game board between moves (BoardPlot) o This will track and show the data from users’ previous moves

      For your submission of your outputs, play 1 game to a win. 

Hints for the program

      Use a 3 x 3 matrix to track the status of the board. 

Hints for Checkwin:

      A winning scenario would be 3 similar markers vertically, horizontally or diagonally.

      Check a passed array using math!

      DRAW A LINE THROUGH THE WINNING  

             

Hints for BoardPlot:

      Draw two grid lines on each axis on a figure

      Label the grid with numbers, letters or whatever you like to help users choose a position

      Evaluate what the user inputs using an if /elseif statement

      Use a 3x3 matrix to pass your selections around

      Don’t try and draw your Xs and Os. Just plot a single marker. 

o You can adjust the size of marker with linespec specifications o Check the documentation for the plot command for more details

      Try to be efficient but brute force is also ok. 

 

HIGH LEVEL NON-FORMATED Pseudocode for the Main Program:

1.   Start the game with a greeting to the players

2.   Have the code decide who goes first

3.   Explain the rules (Make sure you give them enough time)

4.   Use a function, BoardPlot, to show an empty board

5.   Have the players play the game

a. update the board with the function BoardPlot

6.   After each turn, use a function, CheckWin, to see if the game has ended.

7.   At the end of the game, display who won or that it was a draw

8.   Ask user if they would like to play again

a.  If they do, reset and restart

b.  If not, end program

For Extra Credit:

      Add an additional function to the program that checks if a space is already taken before allowing the game to proceed. If the user tries to select a taken area, the program asks them to select again.

o Call this function: CheckTaken

      Add ‘-EC’ to the end of the filename for all parts of the assignment

      You may submit standard versions along with your Extra Credit version o So you still get credit if your EC version doesn’t work. 

 

 

             

Submissions

1.      <Properly named outputs>.pdf

a.       Try to combine. Use ‘_1’ and ‘_2’ if you don’t know how to combine pdfs.

i. Print out of your command window output ii. Print out of your figure

If no Title Blocks in the following, -5% each

2.      <Properly named main script>.m

3.      Checkwin.m

4.      BoardPlot.m

5.      CheckTaken.m

a.       Only if you’re doing the extra credit

Rubric

              P1: Tic Tac Toe  ................................................................  100% Total

o   Pseudocode/Flowchart

§  Logical Approach to problem  .................................. 15% § Well communicated/written  ....................................... 5%

o   Programming

§  Meets functional objectives

              Randomly selects first player .......................... 5%

              Tracks user inputs ............................................ 5%

              Updates board ................................................... 5%

              Determines a winner ........................................ 5% § CheckWin runs without errors ...................................... 5%

§  BoardPlot runs without errors ..................................... 5%

§  Main App runs without errors  ..................................... 5%

§  Appropriate Commands  ............................................ 10%

§  Clean and clear UI  ....................................................... 5%

§  CheckWin commented throughout............................. 10% § BoardPlot commented throughout ............................ 10%

§  Main Application commented throughout  ............... 10%

For Extra Credit  ................................................................  5% Possible o Additional function runs without errors  ................................. 1% o Warns user space is taken ......................................................... 1% o Asks for new input .................................................................... 1% o Commented throughout ............................................................ 2%

Frequently Asked Questions

Is it free to get my assignment evaluated?

Yes. No hidden fees. You pay for the solution only, and all the explanations about how to run it are included in the price. It takes up to 24 hours to get a quote from an expert. In some cases, we can help you faster if an expert is available, but you should always order in advance to avoid the risks. You can place a new order here.

How much does it cost?

The cost depends on many factors: how far away the deadline is, how hard/big the task is, if it is code only or a report, etc. We try to give rough estimates here, but it is just for orientation (in USD):

Regular homework$20 - $150
Advanced homework$100 - $300
Group project or a report$200 - $500
Mid-term or final project$200 - $800
Live exam help$100 - $300
Full thesis$1000 - $3000

How do I pay?

Credit card or PayPal. You don't need to create/have a Payal account in order to pay by a credit card. Paypal offers you "buyer's protection" in case of any issues.

Why do I need to pay in advance?

We have no way to request money after we send you the solution. PayPal works as a middleman, which protects you in case of any disputes, so you should feel safe paying using PayPal.

Do you do essays?

No, unless it is a data analysis essay or report. This is because essays are very personal and it is easy to see when they are written by another person. This is not the case with math and programming.

Why there are no discounts?

It is because we don't want to lie - in such services no discount can be set in advance because we set the price knowing that there is a discount. For example, if we wanted to ask for $100, we could tell that the price is $200 and because you are special, we can do a 50% discount. It is the way all scam websites operate. We set honest prices instead, so there is no need for fake discounts.

Do you do live tutoring?

No, it is simply not how we operate. How often do you meet a great programmer who is also a great speaker? Rarely. It is why we encourage our experts to write down explanations instead of having a live call. It is often enough to get you started - analyzing and running the solutions is a big part of learning.

What happens if I am not satisfied with the solution?

Another expert will review the task, and if your claim is reasonable - we refund the payment and often block the freelancer from our platform. Because we are so harsh with our experts - the ones working with us are very trustworthy to deliver high-quality assignment solutions on time.

Customer Feedback

"Thanks for explanations after the assignment was already completed... Emily is such a nice tutor! "

Order #13073

Find Us On

soc fb soc insta


Paypal supported