"Subscripted assignment dimension mismatch"?
이전 댓글 표시
I'm unable to figure out where this error is coming about in this block of code. Any help would be great. Thank you.
%%Write data to a file (requires writeM2T.m)
cnt=0;
cnt2=0;
ind = [1 2 3 4 5 -win:win];
for i=1:length(Ndya)
for j=1:Nepi
if ~isempty(data(i,j).MOM)
if ~isempty(data(i,j).BABY)
cnt=cnt+1;
OUTcrqa(cnt,:) = [i j data(i,j).crqa];
OUTlagp(cnt,:) = [i j data(i,j).crqaBS];
for k = 1:max(size(data(i,j).crqaCI))
cnt2=cnt2+1;
OUTcrqaCI(cnt2,:) = [i j data(i,j).crqaCI(k,:) ind(k)];
end
end
end
end
end
cd(yourpath)
save('CRQAoutput.mat')
hdr1={'dyad','episode','RR','DET','<L>','Lmax','ENTR','LAM','TT','Vmax','T1','T2','RTE','Clust','Trans'};
writeM2T(OUTcrqa,'outCRQA.dat',hdr1,[],[],'w')
%hdr2=[{'dyad','episode'} {num2cell(-win:win)}];
writeM2T(OUTlagp,'outLAGPcrqad.dat',[],[],[],'w')
% Bootstrapped CI
hdr3={'dyad','episode','CI_U','CI_L','Measure'};
writeM2T(OUTcrqaCI,'outBSCI.dat',hdr3,[],[],'w')
댓글 수: 8
Erik S.
2015년 2월 18일
Which line is the error? What are the sizes of the variables?
Akhila
2015년 2월 18일
Erik S.
2015년 2월 18일
Look in the Matlab command window, it usually says which line the error occured.
Akhila
2015년 2월 18일
Erik S.
2015년 2월 18일
can you send the code?
Akhila
2015년 2월 18일
Erik S.
2015년 2월 18일
I cannot run this... there are files missing for me... Can you send all I need to run the hole thing!
Akhila
2015년 2월 18일
답변 (2개)
Erik S.
2015년 2월 18일
0 개 추천
Your sturcture data only contains the fields "dyad" and "episode" not "MOM" or "BABY"
When you get to line 67 the program crashes.
Erik S.
2015년 2월 18일
0 개 추천
Those lines 38-43 are never executed. The files you are looking for is in another folder than you .m file. Try to move them to the same folder.
댓글 수: 8
Akhila
2015년 2월 18일
Erik S.
2015년 2월 18일
Let me know if it doesnt work. If it works, pls click the accept answer button :)
Akhila
2015년 2월 18일
Akhila
2015년 2월 19일
Erik S.
2015년 2월 19일
What was the original error for you? I get an error in line 154 now. But there seems to be other issues as well. There are 306 exetions with "ME", should it be like that?
Akhila
2015년 2월 19일
Akhila
2015년 2월 19일
카테고리
도움말 센터 및 File Exchange에서 Performance and Memory에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!