While Loop
- Maybe the problem is related to the "while" loop in your program. Check this structure:
Initialize Values
Initialize error %(to enter the loop)
while (error) && (logical constraints)
change variable
.....
.....
error recalculation
end
Save the final value
- Initial Values and Initial Error and saving the final value must be into the outer loop if exists.
- % because of sensitivity to the Initial Values, the Initial values must be chosen logically or physically acceptable and meaningful
- % It also must b considered through logical constraints.