Welcome! Log In Create A New Profile

Advanced

generate_condition Leads to Conversion from Struct to Double Error

Posted by KhaledMTL 
generate_condition Leads to Conversion from Struct to Double Error
August 27, 2024 03:43PM
Hello,

I have been seeking support on generate_condition function and I could not find much online.
I require using the function because I aim to randomly select some stimuli from a file and load them into a condition file using the attached script.
The condition file generated using the function leads to a Conversion from Struct to Double is Not Possible error.
I could not determine if I was misusing the function or if it was outdated, any help or advice on the issue?

Thank you!
Attachments:
open | download - gen_cond.m (2.4 KB)
open | download - gen_cond error.PNG (11.9 KB)
Re: generate_condition Leads to Conversion from Struct to Double Error
August 27, 2024 04:40PM
I think you could figure out the cause if you opened and looked at the generated conditions file. generate_condition() does not work perfectly, but I have no intention to do anything about it. It is not part of NIMH ML and will not be included in the future versions.

If you want a flexible way to select stimuli, see the userloop function.
https://monkeylogic.nimh.nih.gov/docs_CreatingTask.html#Userloop

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.