bachlab / PsPM

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

Problem with 'Non-Linear Model' #165

Closed andgad closed 3 years ago

andgad commented 3 years ago

Dear,

I've got the following error information. Do you know what the problem could be about, or how I could move ahead?

17-Nov-2020 19:26:25 - Failed 'Non-Linear Model' Unable to perform assignment because the left and right sides have a different number of elements. In file "/Users/andersgaddlin/Documents/Psykologi/Termin_10/Kurs14/PsPm/Program/v5.0.0/pspm_dcm.m" (v792), function "pspm_dcm" at line 555. In file "/Users/andersgaddlin/Documents/Psykologi/Termin_10/Kurs14/PsPm/Program/v5.0.0/pspm_cfg/pspm_cfg_run_dcm.m" (???), function "pspm_cfg_run_dcm" at line 131.

The following modules did not run: Failed: Non-Linear Model

Technical Info

irojkov-ph commented 3 years ago

Hi @andgad,

Thank you for reporting the issue :)

The problem could come from the calculation of the minITI variable. I fixed this issue in pull request #161 but it is not yet included in the official PsPM release. So I suggest that you download the develop version of PsPM (link) and try to analyze your data again.

If the problem persists, let us know, and please provide us some data or/and pieces of code to reproduce your issue.

Best, Ivan.

andgad commented 3 years ago

Hi @irojkov-ph,

Thank you for your response!

I tried to use pspm developer version but got even more problem, hmm. I also tried to use an earlier matlab version to see if that was the problem (2019b).

I'v attached the scripts that I used. If you are able to see what the problem is I'm of course deeply thankful.

Please tell if you need to see something else to better see what could have gone wrong.

Best Anders

dcm_batch_20201114_job.txt dcm_batch_20201114.txt print_from_command_window.txt

dcm_batch_20201114_job.txt should be dcm_batch_20201114_job.m dcm_batch_20201114.txt should be dcm_batch_20201114.m

andgad commented 3 years ago

Here are some other file which the above job file is referencing to.

github_dcm_problem.zip

best Anders

irojkov-ph commented 3 years ago

Hi @andgad,

You have wrongly defined your timing matrix ! You can find, attached to this message, their corrected version. I let you check the difference between your timing file and mine. If you have any suggestion on how to explain better how an events variable should look like, we would be pleased to hear it. It's not the first time that it is a source of confusion.

new_timing_events.zip

Best, Ivan

irojkov-ph commented 3 years ago

And I let you close the issue if my previous comment solved it :wink:

andgad commented 3 years ago

Thank you @irojkov-ph, it worked!

Don't know really how to make it easier. Maybe a link in the manual to a site where there is an example provided could work, or screenshots of the matlab window where the timing variable is correctly stated. If there is a lot of questions maybe a youtube video of how to create them could be worth the time.

I had some problem with the time the analysis took, but I open a new thread for that.

Thank you again

Best Anders