use num2str instead of own function
start of energy function for ex3