Is it possible to call on specific stimuli in a set and randomize it based on it's name.

2 views (last 30 days)
I have 144 stimuli named:
1_1_C_D.jpg
1_2_K_C.jpg
1_3_G_F.jpg
1_4_F_H.jpg
1_5_B_K.jpg
1_6_G_C.jpg
1_7_A_F.jpg
1_8_E_K.jpg
1_9_D_B.jpg
1_10_D_E.jpg
1_11_F_D.jpg
1_12_L_G.jpg
2_1_H_E.jpg
2_2_K_H.jpg
2_3_B_D.jpg
2_4_B_J.jpg
2_5_L_A.jpg ... etc. to 12
In my experiment, each character represents a different attribute. I need to be able to call only one attribute at a time in the entire list, for example all stimuli that have x_x_A_x and randomize it - this would be the "same" condition
Also to be able to do the opposite, in this sense call any stimuli such as x_x_A_x and call on all other stimuli that can be anything except x_x_A_x - this would be the "different condition"
Is this possible to do in matlab? Thanks!

Answers (1)

Alberto
Alberto on 1 Oct 2014
You can do that using Regular expressions (so you can choose which files has the desired attribute) and the command dir so you can extract the full list of files.

Categories

Find more on Psychology in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!