analysis:rhythms:step1

This shows you the differences between two versions of the page.

Both sides previous revision Previous revision Next revision | Previous revision | ||

analysis:rhythms:step1 [2018/07/07 10:19] 127.0.0.1 external edit |
analysis:rhythms:step1 [2020/01/15 15:00] mvdm |
||
---|---|---|---|

Line 8: | Line 8: | ||

If your MATLAB runs, great! Now decide if you'd rather: | If your MATLAB runs, great! Now decide if you'd rather: | ||

- | - Familiarize yourself with MATLAB first. Go [[http://ctnsrv.uwaterloo.ca/vandermeerlab/doku.php?id=analysis:rhythms#getting_started_with_matlab | here]]. | + | - Familiarize yourself with MATLAB first. Go [[https://rcweb.dartmouth.edu/~mvdm/wiki/doku.php?id=analysis:rhythms#getting_started_with_matlab | here]]. |

- Dive right in, working with Emotiv data. Read on. | - Dive right in, working with Emotiv data. Read on. | ||

Line 83: | Line 83: | ||

☛ Construct a vector of timestamps containing the time, starting with 0, of each of the 8448 samples in this data. This requires knowing the sampling rate of the Emotiv; consult the manual or the file header to find this out. Then, replot the data using this time vector. | ☛ Construct a vector of timestamps containing the time, starting with 0, of each of the 8448 samples in this data. This requires knowing the sampling rate of the Emotiv; consult the manual or the file header to find this out. Then, replot the data using this time vector. | ||

+ | |||

+ | ==== Optional: streaming Emotiv data ==== | ||

+ | |||

+ | If you want to access Emotiv data in (near) real-time, rather than loading a previously saved file, I recommend using the FieldTrip toolbox. Use Git, as above, to clone the current FieldTrip repository. Then, in MATLAB, add it to your path as follows: | ||

+ | |||

+ | <code> | ||

+ | cd('C:\Users\mvdm\Documents\GitHub\fieldtrip'); | ||

+ | ft_defaults; | ||

+ | </code> | ||

+ | |||

+ | Make sure your Emotiv headset is on and you have the Bluetooth receiver's light flickering. Then, from a command prompt, launch the following two executables: ''buffer.exe'' (in \GitHub\fieldtrip\realtime\bin\win32) and ''./emotiv2ft.exe emotiv-config.txt''. If that looks like it's working (you should get some status updates showing up in the command prompt), do this in MATLAB: | ||

+ | |||

+ | <code> | ||

+ | ft_realtime_plot([]) | ||

+ | </code> |

analysis/rhythms/step1.txt · Last modified: 2020/01/15 15:00 by mvdm

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International