help
help > RE: Question reg second level analysis
Aug 15, 2018 10:08 PM | Jake Flinthoff
RE: Question reg second level analysis
Hello Alfonso -
I based a MATLAB script on what you wrote. However, it is giving me an error. Could you please help me:
clear batch;
batch.Setup.subjects.effect_names{1}='Active';
batch.Setup.subjects.effects{1}=full(sparse(group_Active,1,1,numel(group_Active)+numel(group_SHAM),1));
batch.Setup.subjects.effect_names{2}='SHAM';
batch.Setup.subjects.effects{2}=full(sparse(group_SHAM,1,1,numel(group_Active)+numel(group_SHAM),1));
for n1=1:numel(group_Active)
batch.Setup.subjects.effect_names{2+n1}=['Subject',num2str(n1,'%02d')];
batch.Setup.subjects.effects{2+n1}=full(sparse([group_Active(n1),group_SHAM(n1)],1,1,numel(group_Active)+numel(group_SHAM),1));
end
conn_batch(batch);
I have 2 groups Active vs Sham
The error is : Error using sparse
Index exceeds matrix dimensions.
Can you please help me.
thank you,
Jake
I based a MATLAB script on what you wrote. However, it is giving me an error. Could you please help me:
clear batch;
batch.Setup.subjects.effect_names{1}='Active';
batch.Setup.subjects.effects{1}=full(sparse(group_Active,1,1,numel(group_Active)+numel(group_SHAM),1));
batch.Setup.subjects.effect_names{2}='SHAM';
batch.Setup.subjects.effects{2}=full(sparse(group_SHAM,1,1,numel(group_Active)+numel(group_SHAM),1));
for n1=1:numel(group_Active)
batch.Setup.subjects.effect_names{2+n1}=['Subject',num2str(n1,'%02d')];
batch.Setup.subjects.effects{2+n1}=full(sparse([group_Active(n1),group_SHAM(n1)],1,1,numel(group_Active)+numel(group_SHAM),1));
end
conn_batch(batch);
I have 2 groups Active vs Sham
The error is : Error using sparse
Index exceeds matrix dimensions.
Can you please help me.
thank you,
Jake
Threaded View
Title | Author | Date |
---|---|---|
Johnson H | Oct 17, 2011 | |
Jake Flinthoff | Aug 15, 2018 | |
Alfonso Nieto-Castanon | Oct 17, 2011 | |
Johnson H | Oct 17, 2011 | |
Alfonso Nieto-Castanon | Oct 17, 2011 | |
Johnson H | Oct 17, 2011 | |
MaciĆ Buades-Rotger | Dec 9, 2015 | |
Alfonso Nieto-Castanon | Dec 11, 2015 | |