modify diagonal matrix power
basic function completed
output result to file