Find th efor loop error (simple!... I assume...)
Noobie query, I'm sure...
Can someone spot the parse errors in the following code. It sems to lie in my one for loop. I wasn't sure how to put multiple statements in a single for loop.
Code:
for(i=1; i<=nruns; i++)
{
for(j=1; j<=nsims; j++)
{
if(T_mle[i][j] =0.0)
{
for(k=1; k<=nsims; k!=j; T_mle[i][k]!=0.0; k++)
{
T_mle[i][j]+=T_mle[i][k];
}
T_mle[i][j]=T_mle[i][j]/(nsims-p);
}
}
}
So I want the for loop to run for k=1 to nsims, skipping the cases where T_mle[i]k[]=0.0 as well as when k=j.
Thanks guys.