MATLAB: Expression or statement is incorrect–possibly unbalanced (, {, or [.

{expression or statement is incorrect--possibly unbalanced (or

i get the following error when calling the multipleGarchPrediction [~ ,~ ,~ ,~ ,~ , LR_POF ((j -1) * length ( filenames )+i ,:) ,Z((j -1)*
length ( filenames )+i ,:) ,gamma ((j -1)* length ( filenames )+(i -1) *3+1:(j -1)* length ( filenames )+(i -1) *3+1+2 ,:) ,alpha ((j -1)* length (
filenames )+(i -1) *3+1:(j -1)* length ( filenames )+(i -1) *3+1+2 ,:) ,beta ((j -1)* length ( filenames )+(i -1) *3+1:(j -1)* length ( filenames )+(i -1)
*3+1+2 ,:) ,delta ((j -1) * length ( filenames )+(i -1) *3+1:(j -1)* length (filenames )+(i -1) *3+1+2 ,:) ] = garchPrediction ( cell2mat ( filenames (
i)),startDate , endDate ,N,T,dist , garchmodel ,q,lambda ,l);
Expression or statement is incorrect–possibly unbalanced (, {, or [.

Best Answer

In any list building context,
FUNCTIONNAME (ARGUMENT)
will be interpreted as
FUNCTIONNAME() (ARGUMENT)
Repaired file included.