Difference between revisions of "MatLab Tic-Tac-Toe"

From ENGR005 2008
Jump to: navigation, search
(Code)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Members==
+
=Members=
 
[[User:Pkoonc1|Philip Koonce]]
 
[[User:Pkoonc1|Philip Koonce]]
  
==Project Motivation==
+
=Project Motivation=
 
The primary purpose of this project is to learn how to create a graphical user interface (GUI) in MatLab and to become more comfortable programming in the MatLab language.
 
The primary purpose of this project is to learn how to create a graphical user interface (GUI) in MatLab and to become more comfortable programming in the MatLab language.
  
==Project Descrition==
+
=Project Descrition=
 
MatLab has two primary methods for creating a GUI.  It can be done progamatically or with MatLab's built-in toolset, GUIDE, which stands for Graphical User Interface Development Environment.  I plan to explore both options, and make two final versions of the program, one using each of the methods.  One goal is to implement as many elements of the MatLab GUI as possible.
 
MatLab has two primary methods for creating a GUI.  It can be done progamatically or with MatLab's built-in toolset, GUIDE, which stands for Graphical User Interface Development Environment.  I plan to explore both options, and make two final versions of the program, one using each of the methods.  One goal is to implement as many elements of the MatLab GUI as possible.
  
==Equipment==
+
=Equipment=
 
No equipment in addition to the software and a computer will be required.
 
No equipment in addition to the software and a computer will be required.
  
==Timelime==
+
=Timelime=
 
11/20-12/1 - Learn the various ways of implementing a GUI
 
11/20-12/1 - Learn the various ways of implementing a GUI
 
12/1-12/8  - Implement the program
 
12/1-12/8  - Implement the program
  
==Design Process==
+
=Design Process=
=Concept Sketch=
+
 
 +
==Concept Sketch==
 
[[Image:Interface.jpg]]
 
[[Image:Interface.jpg]]
=Implementation=
+
 
 +
==Implementation==
 
1. GUIDE (Graphical User Interface Environment)
 
1. GUIDE (Graphical User Interface Environment)
    -Overly complicated.  Wrote unnessecary code that was incomprehensible with my limited experience.
+
--Overly complicated.  Wrote unnessecary code that was incomprehensible with my limited experience.
    -Also less accurate.  I couldn't draw the buttons exactly where I wanted them, to a pixel.
+
--Also less accurate.  I couldn't draw the buttons exactly where I wanted them, to a pixel.
 +
2. Create programatically, using MatLab's help manual for instruction
 +
 
 +
==Necessary Components==
 +
1. Parent Figure
 +
2. 9 "Game Grid" buttons
 +
3. "New Game" button
 +
4. "Quit" button
 +
 
 +
==Problems/Solutions==
 +
Global variables - must me declared as global in each function of your program
 +
Callback functions - complicated methods for attaching to UI Buttons and passing arguments.  Help manual explained callbacks in great depth.
 +
 
 +
==Code==
 +
[[Image:TicTacToe Code.zip]]

Latest revision as of 19:12, 10 December 2008

Members

Philip Koonce

Project Motivation

The primary purpose of this project is to learn how to create a graphical user interface (GUI) in MatLab and to become more comfortable programming in the MatLab language.

Project Descrition

MatLab has two primary methods for creating a GUI. It can be done progamatically or with MatLab's built-in toolset, GUIDE, which stands for Graphical User Interface Development Environment. I plan to explore both options, and make two final versions of the program, one using each of the methods. One goal is to implement as many elements of the MatLab GUI as possible.

Equipment

No equipment in addition to the software and a computer will be required.

Timelime

11/20-12/1 - Learn the various ways of implementing a GUI 12/1-12/8 - Implement the program

Design Process

Concept Sketch

Interface.jpg

Implementation

1. GUIDE (Graphical User Interface Environment) --Overly complicated. Wrote unnessecary code that was incomprehensible with my limited experience. --Also less accurate. I couldn't draw the buttons exactly where I wanted them, to a pixel. 2. Create programatically, using MatLab's help manual for instruction

Necessary Components

1. Parent Figure 2. 9 "Game Grid" buttons 3. "New Game" button 4. "Quit" button

Problems/Solutions

Global variables - must me declared as global in each function of your program Callback functions - complicated methods for attaching to UI Buttons and passing arguments. Help manual explained callbacks in great depth.

Code

File:TicTacToe Code.zip