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: createTabDirectivityCoordsUPVRobot.m
    path of file: ./repos/A-Lab/include/Measurements/Special Research - UPV Robot/UI
    
    the code of the file until where you have to start completion: function createTabDirectivityCoordsUPVRobot(app)
% Copyright (C) Jose M. Requena Plens 
% joreple@upv.es - jmrplens.github.io

% Create TabUPVRobotLeftPanelMeasurementPointsDirectivity
app.ExtUI.TabUPVRobotLeftPanelMeasurementPointsDirectivity = uitab(app.ExtUI.TabUPVRobotLeftPanelMeasurementPoints);
app.ExtUI.TabUPVRobotLeftPanelMeasurementPointsDirectivity.Title = 'Directivity';

% Create UPVRobotDirectivityGrid
app.ExtUI.UPVRobotDirectivityGrid = uigridlayout(app.ExtUI.TabUPVRobotLeftPanelMeasurementPointsDirectivity);
app.ExtUI.UPVRobotDirectivityGrid.ColumnWidth = {'1x'};
app.ExtUI.UPVRobotDirectivityGrid.RowHeight = {'1x'};
app.ExtUI.UPVRobotDirectivityGrid.Padding = [5 5 5 5];
app.ExtUI.UPVRobotDirectivityGrid.BackgroundColor = [1 1 1];

% Create UPVRobotDirectivityTypeTab
app.ExtUI.UPVRobotDirectivityTypeTab = uitabgroup(app.ExtUI.UPVRobotDirectivityGrid);
app.ExtUI.UPVRobotDirectivityTypeTab.Layout.Row = 1;
app.ExtUI.UPVRobotDirectivityTypeTab.Layout.Column = 1;
app.ExtUI.UPVRobotDirectivityTypeTab.SelectionChangedFcn = {@UPVRobotDirTabChanged,app};

% Create UPVRobotDirectivityHorVerTab
app.ExtUI.UPVRobotDirectivityHorVerTab = uitab(app.ExtUI.UPVRobotDirectivityTypeTab);
app.ExtUI.UPVRobotDirectivityHorVerTab.Title = 'Hor/Ver';

% Create UPVRobotDirectivityHorVerGrid
app.ExtUI.UPVRobotDirectivityHorVerGrid = uigridlayout(app.ExtUI.UPVRobotDirectivityHorVerTab);
app.ExtUI.UPVRobotDirectivityHorVerGrid.ColumnWidth = {'1x', '0.5x', '1x', '1x'};
app.ExtUI.UPVRobotDirectivityHorVerGrid.RowHeight = {'fit', 10, 'fit', 'fit', 10, 'fit','fit'};
app.ExtUI.UPVRobotDirectivityHorVerGrid.ColumnSpacing = 5;
app.ExtUI.UPVRobotDirectivityHorVerGrid.RowSpacing = 5;
app.ExtUI.UPVRobotDirectivityHorVerGrid.Padding = [5 5 5 5];
app.ExtUI.UPVRobotDirectivityHorVerGrid.BackgroundColor = [1 1 1];

% Create UPVRobotDirectivityHorVerIncThetaLabel
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel = uilabel(app.ExtUI.UPVRobotDirectivityHorVerGrid);
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel.Interpreter = 'latex';
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel.HorizontalAlignment = 'right';
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel.Layout.Row = 4;
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel.Layout.Column = 1;
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel.Text = '$\Delta\Theta$ (deg)';

% Create UPVRobotDirectivityHorVerIncTheta
app.ExtUI.UPVRobotDirectivityHorVerIncTheta = uieditfield(app.ExtUI.UPVRobotDirectivityHorVerGrid, 'numeric');

    
function createTabDirectivityCoordsUPVRobot(app)
% Copyright (C) Jose M. Requena Plens 
% joreple@upv.es - jmrplens.github.io

% Create TabUPVRobotLeftPanelMeasurementPointsDirectivity
app.ExtUI.TabUPVRobotLeftPanelMeasurementPointsDirectivity = uitab(app.ExtUI.TabUPVRobotLeftPanelMeasurementPoints);
app.ExtUI.TabUPVRobotLeftPanelMeasurementPointsDirectivity.Title = 'Directivity';

% Create UPVRobotDirectivityGrid
app.ExtUI.UPVRobotDirectivityGrid = uigridlayout(app.ExtUI.TabUPVRobotLeftPanelMeasurementPointsDirectivity);
app.ExtUI.UPVRobotDirectivityGrid.ColumnWidth = {'1x'};
app.ExtUI.UPVRobotDirectivityGrid.RowHeight = {'1x'};
app.ExtUI.UPVRobotDirectivityGrid.Padding = [5 5 5 5];
app.ExtUI.UPVRobotDirectivityGrid.BackgroundColor = [1 1 1];

% Create UPVRobotDirectivityTypeTab
app.ExtUI.UPVRobotDirectivityTypeTab = uitabgroup(app.ExtUI.UPVRobotDirectivityGrid);
app.ExtUI.UPVRobotDirectivityTypeTab.Layout.Row = 1;
app.ExtUI.UPVRobotDirectivityTypeTab.Layout.Column = 1;
app.ExtUI.UPVRobotDirectivityTypeTab.SelectionChangedFcn = {@UPVRobotDirTabChanged,app};

% Create UPVRobotDirectivityHorVerTab
app.ExtUI.UPVRobotDirectivityHorVerTab = uitab(app.ExtUI.UPVRobotDirectivityTypeTab);
app.ExtUI.UPVRobotDirectivityHorVerTab.Title = 'Hor/Ver';

% Create UPVRobotDirectivityHorVerGrid
app.ExtUI.UPVRobotDirectivityHorVerGrid = uigridlayout(app.ExtUI.UPVRobotDirectivityHorVerTab);
app.ExtUI.UPVRobotDirectivityHorVerGrid.ColumnWidth = {'1x', '0.5x', '1x', '1x'};
app.ExtUI.UPVRobotDirectivityHorVerGrid.RowHeight = {'fit', 10, 'fit', 'fit', 10, 'fit','fit'};
app.ExtUI.UPVRobotDirectivityHorVerGrid.ColumnSpacing = 5;
app.ExtUI.UPVRobotDirectivityHorVerGrid.RowSpacing = 5;
app.ExtUI.UPVRobotDirectivityHorVerGrid.Padding = [5 5 5 5];
app.ExtUI.UPVRobotDirectivityHorVerGrid.BackgroundColor = [1 1 1];

% Create UPVRobotDirectivityHorVerIncThetaLabel
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel = uilabel(app.ExtUI.UPVRobotDirectivityHorVerGrid);
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel.Interpreter = 'latex';
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel.HorizontalAlignment = 'right';
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel.Layout.Row = 4;
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel.Layout.Column = 1;
app.ExtUI.UPVRobotDirectivityHorVerIncThetaLabel.Text = '$\Delta\Theta$ (deg)';

% Create UPVRobotDirectivityHorVerIncTheta
app.ExtUI.UPVRobotDirectivityHorVerIncTheta = uieditfield(app.ExtUI.UPVRobotDirectivityHorVerGrid, 'numeric');
app.ExtUI.UPVRobotDirectivityHorVerIncTheta.Limits = [0 180];
app.ExtUI.UPVRobotDirectivityHorVerIncTheta.Layout.Row = 4;
app.ExtUI.UPVRobotDirectivityHorVerIncTheta.Layout.Column = 2;
app.ExtUI.UPVRobotDirectivityHorVerIncTheta.Value = 0;
app.ExtUI.UPVRobotDirectivityHorVerIncTheta.ValueChangedFcn = {@UPVRobotParameterDirectivityChanged,app};
if ~isempty(app.ExtVar.UPVRobot.incTheta)
    app.ExtUI.UPVRobotDirectivityHorVerIncTheta.Value = app.ExtVar.UPVRobot.incTheta;
else
    app.ExtVar.UPVRobot.incTheta = app.ExtUI.UPVRobotDirectivityHorVerIncTheta.Value;
end