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: runVisualizationScripts.m
    path of file: ./repos/vitruvio/scripts/visualization
    
    the code of the file until where you have to start completion: function runVisualizationScripts(robotVisualization, optimizationProperties, data)
EEnames        = data.basicProperties.EEnames;
config         = data.basicProperties.configSelection;
classSelection = data.basicProperties.classSelection;
task           = data.basicProperties.task;

%% Nominal robot
  if robotVisualization.view 

    
function runVisualizationScripts(robotVisualization, optimizationProperties, data)
EEnames        = data.basicProperties.EEnames;
config         = data.basicProperties.configSelection;
classSelection = data.basicProperties.classSelection;
task           = data.basicProperties.task;

%% Nominal robot
  if robotVisualization.view 
    fprintf('Visualizing nominal robot. \n');
    optimized = false;
    fileName = strcat('Nominal_', classSelection, '_',task, '_', config, '.gif'); % for gif of motion
    
    if robotVisualization.allLegs
        vizIndex = 1;
    elseif robotVisualization.oneLeg
        vizIndex = data.basicProperties.legCount;
    end