I am unsure why I get the error. Can anyone help please
L = [];
indexgood=1;
load mrsgarch_t2
eval(['L(:,',num2str(indexgood),') = Loglike(:);']);
indexgood=indexgood+1;
The error I get:
Subscripted assignment dimension mismatch
thanks
From the code and other comments/answers, my guess is either that L is still empty, which could return that error when you try and access L(:,1), or that logLike(:) is not returning nice 1-d values.
Do us a favor and do: disp(L);pause before you evaluate it and see if its what you were expecting. If you could give us the class and dimensions of logLike and L once its loaded, that would be great.
Additionally, if you are loading L every time, setting L to [] is redundant and can be removed.
eval? - Oliver CharlesworthLoglike? Why are you usingeval? - Dan