if (dimension==1 & exist('initial1d')) | (dimension==2 & exist('initial2d'));
savingpath=uigetdir;
timenow=num2str(datestr(now,30));
current_time_date = ['Saved_Initial_',num2str(timenow(1,10:11)),'.', num2str(timenow(1,12:13)),'.', num2str(timenow(1,14:15)),'__', num2str(timenow(1,5:6)),'.', num2str(timenow(1,7:8)),'.', num2str(timenow(1,1:4)),'.','mat'];
current_time_date = {current_time_date}; %changes current_time_date to a cell for inputdlg
savingname=(inputdlg('','Save As',1,current_time_date));
savingname=savingname{1}; %converts savingname from a cell to a variable for Save
savingname=[savingpath,'\',savingname];
if dimension==1; save(savingname,'initial1d');
elseif dimension==2; save(savingname,'initial2d');
end;
end