Thanks for your suggestion, oko1. If $j=0, the if loop shouldn't run, as the logic condition given in the if statement is if(($energy_rebin[$k] < $energy_before[$j]) && $j!=0){. The problem for this case was that $j was too large due to a typograhical error in the 'for' loop and this yielded the undefined value problem.
However, many thanks for looking through the code and for your suggestion.
Steve
In reply to Re^2: Spurious `undefined' values and conversion issues
by sf_ashley
in thread Spurious `undefined' values and conversion issues
by sf_ashley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |