Apparatus and method for determining the myocardial function state