Welcome! Log In Create A New Profile

Advanced

editable_demo & editable doc discrepancy

Posted by curiousgeorge 
editable_demo & editable doc discrepancy
February 06, 2021 09:33PM
Hello,

I'm trying to add some simple editable variables to my task such as fixation hold. Looking at the example in the docs for editable and the editable_demo, I noticed that the variable range1 when called by editable is an array in the online doc and a char in the editable_demo.

It does show up in the menu when calling it as char by editable, but does not pass along the value to the variable for the task. If set as an array when called by editable, matlab throws an error:
Error using eval
Undefined function or variable 'range1'.

Even though it is defined as indicated
range1 = [0 1000 100 500]

Any help would be appreciated
thank you for your time

*update* calling it as a char and retrieving the last value:
 range1(end) 
gets the desired result and retrieves GUI set value. Still interested to know if there's a reason for the discrepancy.
Re: editable_demo & editable doc discrepancy
February 07, 2021 03:27AM
What editable() accepts is the name of the variable, so the manual was mistyped obviously. Thanks for letting me know.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.