Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

??? Index exceeds matrix dimensions. ERROR

Status
Not open for further replies.

fardeen

Newbie level 2
Joined
Jun 1, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
hi there,
I have encountered the problem of matrix dimension, can anyone help? Here is the code
additional info: indexgood = 1
for j = 1:indexgood-1
errors = realerrors;
eval(['[mse1:),j),mse2:),j),qlike:),j),r2log:),j),mad2:),j),mad1:),j),hmse:),j)] = lossfunctions(errors,V',num2str(j),',1,T+1,invT);']);
eval(['numpar(j) = size(param',num2str(j),',1);']);
eval(['logl(j)=L',num2str(j),';']);
eval(['aic(j) = (-2*logl(j) + 2*numpar(j))/T;']); % Formulas from eviews' maunual
eval(['bic(j) = (-2*logl(j) + numpar(j)*log(T))/T;']);
end

temp = [mse1:)),mse2:)),qlike:)),r2log:)),mad2:)),mad1:)),hmse:))];
lossfun = [temp(5:3:11,:); temp(6:3:12,:); temp(7:3:13,:); temp(1:4,:)];
temp2 = [numpar' persistence' aic' bic' logl'];
others = [temp2(5:3:11,:); temp2(6:3:12,:); temp2(7:3:13,:); temp2(1:4,:)];

??? Index exceeds matrix dimensions.

Error in
lossfun = [temp(5:3:11,:); temp(6:3:12,:); temp(7:3:13,:); temp(1:4,:)];


Thank you

- - - Updated - - -
 
Last edited:

It will be much easier to help You, when You tell us what is the size of temp matrix.
Just put the breakpoint at line with
lossfun = [temp(5:3:11,:); temp(6:3:12,:); temp(7:3:13,:); temp(1:4,:)];
and read the size from workspace.
 

It will be much easier to help You, when You tell us what is the size of temp matrix.
Just put the breakpoint at line with
lossfun = [temp(5:3:11,:); temp(6:3:12,:); temp(7:3:13,:); temp(1:4,:)];
and read the size from workspace.

Thank you very much for reply
I have checked and it shows 9x7 double. While each of component: mse, mse2.... are 1x9 double
thank you
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top