jamesheald/COIN

Undefined function 'normpdf' for input arguments of type 'double'

Closed this issue · 4 comments

I have tried to run the example in modeling_working_memory.m. I get the following error:

>> modelling_working_memory
Simulating the COIN model.
Error using COIN/compute_marginal_distribution
Undefined function 'normpdf' for input arguments of type 'double'.

Error in COIN/predict_state_feedback (line 697)
            D = obj.compute_marginal_distribution(D);

Error in COIN/main_loop (line 535)
                D = obj.predict_state_feedback(D);                      % predict the state feedback

Error in COIN/simulate_COIN (line 233)
                parfor (run = 1:obj.runs,obj.max_cores)

Error in modelling_working_memory (line 16)
OUTPUT_WM = obj_WM.simulate_COIN;

I noticed in the documentation of the lightspeed toolbox that they changed normpdf to mvnormpdf after version 2.4. Did I not install the right toolbox version? Which one is being used for the COIN model to run?

Thank you for your help!

Hey @SIHranova. normpdf is a standard inbuilt matlab function if I'm not mistaken. What do you see if you call 'which normpdf'?

Hey @jamesheald, thank you for the quick response! When I do which normpdf I get:

>> which normpdf
'normpdf' not found.

If i try to call the function it suggest the following:

>> normpdf()
normpdf requires Statistics and Machine Learning Toolbox.

Do I also require the Statistics and Machine Learning Toolbox? I assumed that since we have to install the lightspeed toolbox package, we source normpdf from there.

Yes, it looks like the Statistics and Machine Learning Toolbox is required. You could either get this package or write the function yourself (it's a single line of code). Let me know if you need any assistance.

No, thank you, that is enough! Maybe just add that to your README :)