Forums
Retrieve subject name in data - Printable Version

+- Forums (https://sanworks.io/forum)
+-- Forum: Bpod (https://sanworks.io/forum/forumdisplay.php?fid=1)
+--- Forum: Software (https://sanworks.io/forum/forumdisplay.php?fid=6)
+--- Thread: Retrieve subject name in data (/showthread.php?tid=561)



Retrieve subject name in data - veronica - 03-20-2019

Hi,

Is there somewhere in the session data where I can find the name of the subject that trained? I would like to load one of the files that is saved at the end of the session to matlab and then retrieve the name of the subject, can that be done?

Thank you!
Veronica


RE: Retrieve subject name in data - Josh - 03-21-2019

Hi Veronica, 

It's not saved explicitly in the data struct, but the file name contains the subject name - so you can parse it out. This line should do it:

SubjectName = FileName(1:find(FileName== '_', 1)-1)


RE: Retrieve subject name in data - veronica - 03-25-2019

Thanks Josh!