Thread: RB-730 with matlab View Single Post
Junior Member
Join Date: Apr 2008
akr is on a distinguished road Posts: 4
RB-730 with matlab, Posted April 2nd, 2008 #1
Hello All,

I am trying to design a matlab program that can continuously update a horizontal bar graph as the user presses a certain key on the Cedrus box (RB-730).

I was able to get matlab to communicate with the response box using the code found in one of the earlier posts on using matlab with the response box. I was able to get a graph that updated too, but the graph does not update quickly enough when I press the keys at a fast rate.

My question:

Is it possible for the subject to continuously press and hold a key and can matlab keep updating the size of the bar as the key is pressed at a certain rate.

I have posted the code I'm currently using below. cedrusxid refers to the function from one of the previous posts on accessing the Response Box. Any suggestions are greatly appreciated.



function [ output_args ] = test
%TEST Summary of this function goes here
% Detailed explanation goes here

maxscale = 55;
tension = 1;
barh([tension maxscale]);
while x<100
y = cedrusxid;
if y == 80
tension = tension + 1;

if y == 112
tension = tension - 1;
if y == 48
x = 100;
barh([tension maxscale]);
Reply With Quote