Hello,
Your B-matrix suggests there are two input (factors), i.e. dimension [n x n x u] where n=3 is the number of regions and u=2 is the number of inputs. However your C-matrix suggests there are three inputs. It is of dimension [n x u] which you have as 3x3. So you need to ensure that both the third dimension of matrix B and the second dimension of matrix C are the same as the number of inputs, which you can find by looking in DCM.U.name
Best
Peter
-----Original Message-----
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On Behalf Of B Hosseini
Sent: 25 October 2017 23:12
To: [log in to unmask]
Subject: [SPM] Dynamic Causal Modeling Script Matrices
Hello, I'm looking for a bit of assistance with the DCM script provided by SPM's website. Matlab is throwing an error whenever I run the script that says 'Error in inline expression ==> spm_int(P,M,U).' I believe my DCM.b and DCM.c matrices may be incorrect...
Our model includes three regions (A, B, C) and two factors (1, 2).
Regional connections: A <--> B <--> C
Factor 1 modulates A --> B and C --> B
Factor 1 is also an input --> A
Given that model, I set up the following matrices:
DCM.a = [1 1 0; 1 1 1; 0 1 1];
DCM.b = zeros(3,3,2); DCM.b(2,1,1) = 1; DCM.b(3,2,1) = 1; DCM.c = [1 0 0; 0 0 0; 0 0 0]; DCM.d = zeros(3,3,0);
I'm not entirely sure why the matrices are incorrect. Can anyone spot the issue?
Please let me know if that is unclear and I will try to clarify. Thanks!
|