You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: CreateMatrixFrom3DGrid.m
    path of file: ./repos/2D_3D_PolarFourierTransform/MATLAB CodeBase/NVIDIA_3DSphericalDFT
    
    the code of the file until where you have to start completion: function [ matrix_Transform ] = CreateMatrixFrom3DGrid( charGrid, K,M,N, show)
%CREATEMATRIXFROMGRID creates the matrix transform operator
% N+1 x N+1 is the size of the image
% M is the number of angles


    
function [ matrix_Transform ] = CreateMatrixFrom3DGrid( charGrid, K,M,N, show)
%CREATEMATRIXFROMGRID creates the matrix transform operator
% N+1 x N+1 is the size of the image
% M is the number of angles

deltaTheta = 180/K;                    % Angular sampling rate theta
anglesTheta = 0:deltaTheta:180-deltaTheta;

deltaPhi = 180/M;                      % Angular sampling rate phi
anglesPhi = 0:deltaPhi:180-deltaPhi;


matrix_Transform = [];
gridSpacing = -N/2:N/2;
lineWidth = 1.7;
switch(charGrid)
%     case 'C'       % Pure Cartesian Grid
%         [CartesianGridX, CartesianGridY]= meshgrid(gridSpacing,gridSpacing);
%         for k = 1:length(gridSpacing)
%             for l = 1:length(gridSpacing)
%                 point = [CartesianGridX(k,l);CartesianGridY(k,l)];
%                 if(show)
%                         plot(point(1),point(2), '.r', 'LineWidth', lineWidth)
%                 end