You didn’t say which element of G you are comparing to Matlab, or what you think the correct answer is for that element, or how you are doing the comparison.
(For example, for k=9im, the maximum element of G has an absolute value of ≈ 8103.08. An absolute difference of ≈ 6.36646e-12 in that element corresponds to a relative error of about 7.9e-16, or about 3.5ulps, which is quite reasonable for a difference between two calculations of this sort. You really need to look at relative errors to understand accuracy.)