get-state component addition and first working numerical integration in matlab