Tuesday, March 28, 2017

Friday, March 10, 2017

Perceptron Challenge


As you finish the perceptron training, you have a new challenge to tackle - modifying the
perceptron code to classify a new data set. The information of the data set is listed in the following:
  1. No.of classes: 2 (class 0 and 1)
  2. No. of training data: 2000
  3. No. of testing data: 400
  4. No. of features: 3 (feature vector is in 3-dimensional space)
  5. Files: training.txt, and testing.txt
Since the original perceptron is only for 2-dimensional data, you need to identify and modify all the dimension-related code to make it work. After you finishing the classification, visualize your training and testing data, and the decision boundary using Grapher in Mac laptop (see example). Our deadline for this challenge is March 17, 2017 (Friday).

The Artificial Neural Network (ANN) presentations are available in the following:
  1. ANN 01 - Artificial Neurons
  2. ANN 02 - Perceptrons 
The Perceptron code can be found at the link.

Tuesday, February 14, 2017

MATLAB Serial Monitor

% MATLAB-Arduino Serial Port Monitor
clear
clc

% Defined Serial Port
serialPort = '/dev/cu.usbmodem1421';            % define COM port #

%Open Serial COM Port
s = serial(serialPort)
fopen(s);

delay = .01;                    % make sure sample faster than resolution

while 1 %Loop when Plot is Active
    dat = fscanf(s,'%f'); %Read Data from Serial as Float
 
    if(~isempty(dat) && isfloat(dat)) %Make sure Data Type is Correct       
        disp (dat);
    end
        
    %Allow MATLAB to Update Plot
    pause(delay);
end

%Close Serial COM Port and Delete useless Variables
fclose(s);
clear count dat delay s serialPort;

Thursday, December 15, 2016

Robot Programming: Line Tracking

Please watch the following VEX Cortex video tutorials to learn the basic concepts of programming, system configuration, motion control, and line tracking.
 
1. Introduction to Programming

2. Wired System Configuration

3. Download Sample

4. Moving Forward

5. Speed and Direction

6. Line Tracking

For more information, please visit the VEX EDR Video Trainer web site.

Sunday, November 27, 2016

MATLAB Video Tutorials Progress Chart

MATLAB Video Tutorials: Watch the MATLAB tutorials such that you can use this powerful tool to help you solve a wide spectrum of STEM problems. Please use the Progress Chart to document your personal progress in watching the tutorials.  

Part I: MATLAB Overview
  1. MATLAB Overview: Get an overview of MATLAB®, the language of technical computing. (2:05)
  2. Analyzing and Visualizing Data with MATLAB: Explore, visualize, and model your data with MATLAB®. (3:26)
  3. Programming and Developing Algorithms with MATLAB: Write programs and develop algorithms using the high-level language and development tools in MATLAB®. (4:32)
  4. Developing and Deploying Applications with MATLAB: Develop and share MATLAB® applications as code, executables, or software components. (3:51)
  5. Getting Started with MATLAB: Get started with MATLAB® and learn how to get more information. (7:00)
  6. Working in The Development Environment: Access tools such as the command history workspace browser and variable editor, save and load your workspace data, and manage windows and desktop layout. (5:21)
  7. Top Ways to Get Help: Find online support to help solve your toughest problems while using MATLAB® and Simulink® products. (3:20)
  8. Importing Data from Text Files Interactively: Use the import tool to import numeric and text data from delimited and fixed width text files. Generate MATLAB® code to repeat the process on similar files. (7:01)
  9. Importing Data from Files Programmatically: Import data from spreadsheets, text files, and other formats into MATLAB® using file I/O functions. (3:55)
  10. Importing Spreadsheets into MATLAB: Select and load mixed textual and numeric data from spreadsheets interactively then generate the required MATLAB® code. (4:34)
  11. Using Basic Plotting Functions: Create plots programmatically using basic plotting functions. (5:52)
  12. Working with Arrays in MATLAB: Create and manipulate MATLAB® arrays, including accessing elements using indexing. (8:17)
  13. Introducing MATLAB Fundamental Classes (Data Types): Work with numerical, textual, and logical data types. (5:46)
  14. Introducing Tables and Categorical Arrays: Manage mixed-type tabular data with the table data container, and data from a finite, discrete set of categories with the memory-efficient categorical array. (6:01)
  15. Introducing Structures and Cell Arrays: Use structures and cell arrays to manage heterogeneous data of different types and sizes. (5:04)
  16. Writing a MATLAB Program: Write a MATLAB® program, including creating a script and a function. (4:57)
  17. Publishing MATLAB Code from the Editor: Share your work by publishing MATLAB® code from the MATLAB Editor to HTML and other formats. (5:57)
  18. Developing Classes Overview: Design classes by defining properties, methods, and events in a class definition file. (10:48)
  19. Calling MATLAB from C Code: Call MATLAB® from C, C++ or Fortran code using the MATLAB Engine Library. (1:30)
Part II: Computer Programming with MATLAB