Page 2 of 2
Re: Loop Intial Values over MAXIMIZE Instruction
Posted: Tue Mar 05, 2013 11:09 am
by TomDoan
Sorry. With that logic, the test should be k<N not k<=N
compute k=0
while k<N {
It seems to generate one table with five rows and eight columns. Isn't that what you want?
Re: Loop Intial Values over MAXIMIZE Instruction
Posted: Tue Mar 05, 2013 11:46 am
by rbelhach95
Thanks soooooooo much Tom, it works beautifully.
Rachid
Re: Loop Intial Values over MAXIMIZE Instruction
Posted: Thu Mar 07, 2013 11:02 am
by rbelhach95
Dear Tom,
Sorry to bother you again with this, but I did the simulation (please see the attached code) and I successfully generate the xls table , but the code generates all the 1000 simulated values i.e even when the estimation does not converge and as I understand it the" while loop" should have eliminated those cases. Is there a way to fix this problem or may be do some kind of loop to regenerate the data again until convergence is attained? Your help is appreciated and thank you.
Rachid
Re: Loop Intial Values over MAXIMIZE Instruction
Posted: Fri Mar 08, 2013 6:53 am
by TomDoan
It generates 1000 because you keep going until you get that many that work. Work through the logic of the WHILE loop.
Re: Loop Intial Values over MAXIMIZE Instruction
Posted: Sun Mar 10, 2013 3:01 pm
by rbelhach95
Thanks a lot Tom for you help
Rachid