# Index exceeds matrix dimensions when running &quot;keyDots&quot;

**URL:** <https://psychtoolbox.discourse.group/t/index-exceeds-matrix-dimensions-when-running-quot-keydots-quot/1954>\
**Category:** Uncategorized\
**Created:** [August 22, 2017, 6:30pm UTC](https://psychtoolbox.discourse.group/t/index-exceeds-matrix-dimensions-when-running-quot-keydots-quot/1954 "2017-08-22T18:30:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [August 22, 2017, 6:30pm UTC](https://psychtoolbox.discourse.group/t/index-exceeds-matrix-dimensions-when-running-quot-keydots-quot/1954/1 "2017-08-22T18:30:25Z")

</div>

Dear Psychtoolbox Group,

I am getting the error "Index exceeds matrix dimensions"&nbsp;when I attempt to run the keyDots.m program&nbsp;from the Variable Coherence Random Dot Motion code provided at&nbsp;[https://www.shadlenlab.columbia.edu/resources/VCRDM.html](https://www.shadlenlab.columbia.edu/resources/VCRDM.html).&nbsp;

What is the best way to debug the program, and would you happen to know possible indices that might exceed matrix dimensions?&nbsp;

Thank you, in advance, for your help!

Sarah&nbsp;

&nbsp;
