Using scan to loop across differenet length of vectors

Oh well, the issues with sending out code on the forum is that everyone can see the big errors you’ve made in the code :slight_smile:

I have noticed a “bug”.
On the second scan I output

vec2

, but I then use the following line:

vec2_ = vec[trials2, subj2,0] * beta[subj2]

Which explains why the model can’t find an ok alpha. Correcting that issue - everything seems to work well.
Thank you (again) for the great help you provide. It is almost impossible doing these things without this forums.

3 Likes