calculate k, print K to plot it in gnuplot. startet on print function for the matrices