HI i'm a new user in mata and i'm trying to run a loop but i got an error message that says 'expectedValueFunctionnCapitalnProductivity' found where almost anything else expected
Here's the code
while(maxDifference > tolerance){
for(nProductivity = 0; nProductivity < nGridProductivity; nProductivity++){
for(nCapital = 0; nCapital < nGridCapital; nCapital++){
expectedValueFunctionnCapitalnProductivity = 0.0;
}
}
else{
for(nProductivityNextPeriod = 0; nProductivityNextPeriod < nGridProductivity; nProductivityNextPeriod++){
expectedValueFunctionnCapitalnProductivity = mTransitionnProductivitynProductivityNextPeriod * mValueFunctionnCapitalnProductivityNextPeriod;
}
}
}
Can someone help me ?
Here's the code
while(maxDifference > tolerance){
for(nProductivity = 0; nProductivity < nGridProductivity; nProductivity++){
for(nCapital = 0; nCapital < nGridCapital; nCapital++){
expectedValueFunctionnCapitalnProductivity = 0.0;
}
}
else{
for(nProductivityNextPeriod = 0; nProductivityNextPeriod < nGridProductivity; nProductivityNextPeriod++){
expectedValueFunctionnCapitalnProductivity = mTransitionnProductivitynProductivityNextPeriod * mValueFunctionnCapitalnProductivityNextPeriod;
}
}
}
Can someone help me ?
Comment