bachlab / PsPM

A matlab suite for Psycho-Physiological Modelling
GNU General Public License v3.0
45 stars 11 forks source link

Matrix for computing mean response in non-linear model is incorrectly padded with zeros #565

Closed dominikbach closed 10 months ago

dominikbach commented 11 months ago

Summary

In pspm_dcm, trial-by-trial responses are extracted for computing mean response and thereby, response amplitude priors. When trials have unequal length, the average response is (implicitly) padded with zeros. NaN should be used instead.

It would also be preferable to initialise matrix D with NaN as this will speed up the extraction.

Line 645-660 of pspm_dcm.