void napln(){
        Scanner s=new Scanner(System.in);
        System.out.println("zadej prvky matice");
        for (int i = 0; i < matice.length; i++) {
            for (int j = 0; j < matice[0].length; j++) {
                while(!s.hasNextDouble()){
                    System.out.println("je nutné zadat číslo");
                    s.next();
                }
                matice[i][j]=s.nextDouble();
            }
        }
    }