Add data to Matlab code using MySQL

In order to add the code to Matlab, you need to access the WAI database using MySQL Workbench. See here for instructions to download it and add the correct user workbench.

Once you access the user workbench, type in the following three lines into the Query page as demonstrated below:

Screen Shot 2016-06-21 at 10.16.18 AM

Run the ‘use wai;’ line first by clicking on the lightning bolt with the small “I” next to it, then run the ‘select * from Subject;’ line next. The table with all the Subject information in the database will appear, as shown below. Download the table by clicking on the grid with the save icon next to the Export/Import Option.

Screen Shot 2016-06-21 at 10.30.04 AM

Save the file in the same folder you saved the downloaded Matlab code. Repeat the same process with the measurements table by running the line of code ‘select * from Measurements;’ and exporting the table.

Open the Matlab code (GraphDownloadedData) and replace the text that says “test_subjects.csv” and “test_measurements.csv” with the files you saved for the subjects and measurements tables respectively (make sure you still include the quotation marks and .csv).

To see a description on how the code runs, click here.