function Switch_Populations

multiple_population_handle = findobj('Tag','Fig_multiple_population');
populations_handle = findobj(multiple_population_handle,'Tag','PopupMenu_populations');
uo_handle = findobj(multiple_population_handle,'Tag','EditText_uo');
growth_rate_handle = findobj(multiple_population_handle,'Tag','EditText_growth_rate');
morality_rate_handle = findobj(multiple_population_handle,'Tag','EditText_morality_rate');
reproduction_rate_handle = findobj(multiple_population_handle,'Tag','EditText_reproduction_rate');
inflow_handle = findobj(multiple_population_handle,'Tag','EditText_inflow');
weighing_function_handle = findobj(multiple_population_handle,'Tag','EditText_weighing_function');
probability_handle=findobj(multiple_population_handle,'Tag','EditText_Probability');
axes_density_handle = findobj(multiple_population_handle,'Tag','Axes_population_density');
axes_moment_handle = findobj(multiple_population_handle,'Tag','Axes_population_moment');

current_population = get(populations_handle,'Value');

handles = [uo_handle,growth_rate_handle,morality_rate_handle,reproduction_rate_handle,...
      inflow_handle,weighing_function_handle,probability_handle];

parameters_str = {'uo','g','m','b','c','w','gam'};

parameters = get(multiple_population_handle,'UserData');

L = length(handles);

for i = 1:L
    value = getfield(parameters{3}(current_population),parameters_str{i});
    
    if(~isempty(value))
        set(handles(i),'String',num2str(value));
    else
        set(handles(i),'String','');
    end
    
end


if (~isempty(parameters{4}))
    
    w_f=get(handles(6),'string');
    [w_var,w_pos] = Find_Var(w_f,{'x','y'});
    hierarchy=any(strcmp('x',w_var));
    
    x = parameters{4}{1};
    t = parameters{4}{2};
    u = parameters{4}{3};
    Ptotal = parameters{4}{4};
   
    if(current_population<=length(u))
       
        axes(axes_density_handle);
        cla;
        mesh(x,t,u{current_population})
        xlabel('x');
        ylabel('t');
        title(['Population ',num2str(current_population),':  Population Density'],...
                'Color','blue','FontSize',10,'Units','normalized');
        set(axes_density_handle,'Tag','Axes_population_density');

        if (hierarchy)
           axes(axes_moment_handle);
           cla; 
           mesh(x,t,Ptotal{current_population})
           xlabel('x');
           ylabel('t');
        else
           axes(axes_moment_handle);
           cla;
           plot(t,Ptotal{current_population}(:,1));
           xlabel('t');
        end
        title(['Population ',num2str(current_population),':  Population Moment'],...
            'Color','blue','FontSize',10,'Units','normalized');
        set(axes_moment_handle,'Tag','Axes_population_moment');
        
    end
    
end





