function LoadingRateArray = doThreeParameters(ovenObj, MOTobj, BeamName, FirstBeamParameter, FirstParameterArray, ... SecondBeamParameter, SecondParameterArray, ThirdBeamParameter, ThirdParameterArray) NumberOfPointsForThirdParam = length(ThirdParameterArray); LoadingRateArray = {}; for i=1:NumberOfPointsForThirdParam eval(sprintf('MOTobj.%s = %d;', ThirdBeamParameter, ThirdParameterArray(i))); LoadingRateArray{end+1} = Simulator.Scan.doTwoParameters(ovenObj, MOTobj, BeamName, FirstBeamParameter, FirstParameterArray, SecondBeamParameter, SecondParameterArray); end if MOTobj.DoSave LoadingRate = struct; LoadingRate.Values = LoadingRateArray; MOTobj.Results = LoadingRate; SaveFolder = [MOTobj.SaveDirectory filesep 'Results']; Filename = ['ThreeParameterScan_' datestr(now,'yyyymmdd_HHMM')]; eval([sprintf('%s_Object', Filename) ' = MOTobj;']); mkdir(SaveFolder); save([SaveFolder filesep Filename], sprintf('%s_Object', Filename)); end end