//
// MATLAB Compiler: 2.2
// Date: Wed Mar 10 16:44:48 2004
// Arguments: "-B" "macro_default" "-O" "all" "-O" "fold_scalar_mxarrays:on"
// "-O" "fold_non_scalar_mxarrays:on" "-O" "optimize_integer_for_loops:on" "-O"
// "array_indexing:on" "-O" "optimize_conditionals:on" "-p" "-W" "main" "-L"
// "Cpp" "-t" "-T" "link:exe" "-h" "libmmfile.mlib" "-B" "sglcpp" "-p" "-W"
// "main" "-L" "Cpp" "-t" "-T" "link:exe" "-h" "libmmfile.mlib" "-W" "mainhg"
// "libmwsglm.mlib" "hier_community.m" "Default.m" "Stop_Simulation.m"
// "Call_SaveLoad_Fig.m" "SaveLoad_Fig.m" "SaveLoad.m" "Load_Population_Data.m"
// "Save_Population_Data.m" "Start_hier_community.m" "MyInline.m" "My_Eval.m"
// "isnumber.m" "Find_Var.m" "Change_Number_of_Populations.m"
// "Switch_Populations.m" "Store_Parameters.m" 
//
#include "Start_hier_community.hpp"
#include "Find_Var.hpp"
#include "MyInline.hpp"
#include "cla.hpp"
#include "libmatlbm.hpp"
#include "libmmfile.hpp"
#include "mesh.hpp"
#include "title.hpp"
#include "xlabel.hpp"
#include "ylabel.hpp"

static mxChar _array1_[158] = { 'R', 'u', 'n', '-', 't', 'i', 'm', 'e', ' ',
                                'E', 'r', 'r', 'o', 'r', ':', ' ', 'F', 'i',
                                'l', 'e', ':', ' ', 'S', 't', 'a', 'r', 't',
                                '_', 'h', 'i', 'e', 'r', '_', 'c', 'o', 'm',
                                'm', 'u', 'n', 'i', 't', 'y', ' ', 'L', 'i',
                                'n', 'e', ':', ' ', '1', ' ', 'C', 'o', 'l',
                                'u', 'm', 'n', ':', ' ', '1', ' ', 'T', 'h',
                                'e', ' ', 'f', 'u', 'n', 'c', 't', 'i', 'o',
                                'n', ' ', '"', 'S', 't', 'a', 'r', 't', '_',
                                'h', 'i', 'e', 'r', '_', 'c', 'o', 'm', 'm',
                                'u', 'n', 'i', 't', 'y', '"', ' ', 'w', 'a',
                                's', ' ', 'c', 'a', 'l', 'l', 'e', 'd', ' ',
                                'w', 'i', 't', 'h', ' ', 'm', 'o', 'r', 'e',
                                ' ', 't', 'h', 'a', 'n', ' ', 't', 'h', 'e',
                                ' ', 'd', 'e', 'c', 'l', 'a', 'r', 'e', 'd',
                                ' ', 'n', 'u', 'm', 'b', 'e', 'r', ' ', 'o',
                                'f', ' ', 'o', 'u', 't', 'p', 'u', 't', 's',
                                ' ', '(', '0', ')', '.' };
static mwArray _mxarray0_ = mclInitializeString(158, _array1_);

static mxChar _array3_[3] = { 'T', 'a', 'g' };
static mwArray _mxarray2_ = mclInitializeString(3, _array3_);

static mxChar _array5_[23] = { 'F', 'i', 'g', '_', 'm', 'u', 'l', 't',
                               'i', 'p', 'l', 'e', '_', 'p', 'o', 'p',
                               'u', 'l', 'a', 't', 'i', 'o', 'n' };
static mwArray _mxarray4_ = mclInitializeString(23, _array5_);

static mxChar _array7_[8] = { 'U', 's', 'e', 'r', 'D', 'a', 't', 'a' };
static mwArray _mxarray6_ = mclInitializeString(8, _array7_);
static mwArray _mxarray8_ = mclInitializeDouble(15.0);
static mwArray _mxarray9_ = mclInitializeDouble(1.0);

static mxChar _array11_[4] = { 'I', 'D', 'L', 'E' };
static mwArray _mxarray10_ = mclInitializeString(4, _array11_);

static mxChar _array13_[21] = { 'P', 'o', 'p', 'u', 'p', 'M', 'e',
                                'n', 'u', '_', 'p', 'o', 'p', 'u',
                                'l', 'a', 't', 'i', 'o', 'n', 's' };
static mwArray _mxarray12_ = mclInitializeString(21, _array13_);

static mxChar _array15_[30] = { 'E', 'd', 'i', 't', 'T', 'e', 'x', 't',
                                '_', 'n', 'u', 'm', 'b', 'e', 'r', '_',
                                'o', 'f', '_', 'p', 'o', 'p', 'u', 'l',
                                'a', 't', 'i', 'o', 'n', 's' };
static mwArray _mxarray14_ = mclInitializeString(30, _array15_);

static mxChar _array17_[21] = { 'E', 'd', 'i', 't', 'T', 'e', 'x',
                                't', '_', 'm', 'a', 'x', 'i', 'm',
                                'u', 'm', '_', 't', 'i', 'm', 'e' };
static mwArray _mxarray16_ = mclInitializeString(21, _array17_);

static mxChar _array19_[29] = { 'E', 'd', 'i', 't', 'T', 'e', 'x', 't',
                                '_', 'n', 'u', 'm', 'b', 'e', 'r', '_',
                                'o', 'f', '_', 't', 'i', 'm', 'e', '_',
                                's', 't', 'e', 'p', 's' };
static mwArray _mxarray18_ = mclInitializeString(29, _array19_);

static mxChar _array21_[18] = { 'E', 'd', 'i', 't', 'T', 'e', 'x', 't', '_',
                                'm', 'a', 'x', 'i', 'm', 'u', 'm', '_', 'x' };
static mwArray _mxarray20_ = mclInitializeString(18, _array21_);

static mxChar _array23_[30] = { 'E', 'd', 'i', 't', 'T', 'e', 'x', 't',
                                '_', 'n', 'u', 'm', 'b', 'e', 'r', '_',
                                'o', 'f', '_', 'x', '_', 'i', 'n', 't',
                                'e', 'r', 'v', 'a', 'l', 's' };
static mwArray _mxarray22_ = mclInitializeString(30, _array23_);

static mxChar _array25_[21] = { 'S', 't', 'a', 't', 'i', 'c', 'T',
                                'e', 'x', 't', '_', 's', 't', 'a',
                                't', 'u', 's', '_', 'b', 'a', 'r' };
static mwArray _mxarray24_ = mclInitializeString(21, _array25_);

static mxChar _array27_[16] = { 'P', 'u', 's', 'h', 'b', 'u', 't', 't',
                                'o', 'n', '_', 's', 't', 'a', 'r', 't' };
static mwArray _mxarray26_ = mclInitializeString(16, _array27_);

static mxChar _array29_[23] = { 'A', 'x', 'e', 's', '_', 'p', 'o', 'p',
                                'u', 'l', 'a', 't', 'i', 'o', 'n', '_',
                                'd', 'e', 'n', 's', 'i', 't', 'y' };
static mwArray _mxarray28_ = mclInitializeString(23, _array29_);

static mxChar _array31_[22] = { 'A', 'x', 'e', 's', '_', 'p', 'o', 'p',
                                'u', 'l', 'a', 't', 'i', 'o', 'n', '_',
                                'm', 'o', 'm', 'e', 'n', 't' };
static mwArray _mxarray30_ = mclInitializeString(22, _array31_);

static mxChar _array33_[16] = { 'R', 'a', 'd', 'i', 'o', 'b', 'u', 't',
                                't', 'o', 'n', '_', 'c', 'o', 'n', 't' };
static mwArray _mxarray32_ = mclInitializeString(16, _array33_);

static mxChar _array35_[6] = { 'S', 't', 'r', 'i', 'n', 'g' };
static mwArray _mxarray34_ = mclInitializeString(6, _array35_);

static mxChar _array37_[12] = { 'I', 'n', 'i', 't', 'i', 'a',
                                'l', 'i', 'z', 'i', 'n', 'g' };
static mwArray _mxarray36_ = mclInitializeString(12, _array37_);

static mxChar _array39_[5] = { 'V', 'a', 'l', 'u', 'e' };
static mwArray _mxarray38_ = mclInitializeString(5, _array39_);

static mxChar _array41_[6] = { 'A', 'C', 'T', 'I', 'V', 'E' };
static mwArray _mxarray40_ = mclInitializeString(6, _array41_);
static mwArray _mxarray42_ = mclInitializeDouble(3.0);
static mwArray _mxarray43_ = mclInitializeDoubleVector(0, 0, (double *)NULL);

static mxChar _array45_[2] = { 'u', 'o' };
static mwArray _mxarray44_ = mclInitializeString(2, _array45_);

static mxChar _array47_[1] = { 'g' };
static mwArray _mxarray46_ = mclInitializeString(1, _array47_);

static mxChar _array49_[1] = { 'm' };
static mwArray _mxarray48_ = mclInitializeString(1, _array49_);

static mxChar _array51_[1] = { 'b' };
static mwArray _mxarray50_ = mclInitializeString(1, _array51_);

static mxChar _array53_[1] = { 'c' };
static mwArray _mxarray52_ = mclInitializeString(1, _array53_);

static mxChar _array55_[1] = { 'w' };
static mwArray _mxarray54_ = mclInitializeString(1, _array55_);

static mxChar _array57_[3] = { 'g', 'a', 'm' };
static mwArray _mxarray56_ = mclInitializeString(3, _array57_);

static mxChar _array59_[2] = { '<', '=' };
static mwArray _mxarray58_ = mclInitializeString(2, _array59_);

static mxChar _array61_[1] = { 'P' };
static mwArray _mxarray60_ = mclInitializeString(1, _array61_);

static mxChar _array64_[1] = { 'x' };
static mxArray * _mxarray63_ = mclInitializeString(1, _array64_);
static mwArray _mxarray62_ = mclInitializeCell(_mxarray63_);

static mxChar _array67_[1] = { 't' };
static mxArray * _mxarray66_ = mclInitializeString(1, _array67_);
static mwArray _mxarray65_ = mclInitializeCell(_mxarray66_);

static mxChar _array71_[1] = { 'y' };
static mxArray * _mxarray70_ = mclInitializeString(1, _array71_);

static mxArray * _array69_[2] = { _mxarray63_, _mxarray70_ };
static mwArray _mxarray68_ = mclInitializeCellVector(1, 2, _array69_);
static mwArray _mxarray72_ = mclInitializeDouble(2.0);
static mwArray _mxarray73_ = mclInitializeDouble(0.0);
static mwArray _mxarray74_ = mclInitializeString(1, _array64_);
static mwArray _mxarray75_ = mclInitializeCell(_mxarray70_);
static mwArray _mxarray76_ = mclInitializeDouble(4.0);

static mxChar _array78_[11] = { 'P', 'o', 'p', 'u', 'l', 'a',
                                't', 'i', 'o', 'n', ' ' };
static mwArray _mxarray77_ = mclInitializeString(11, _array78_);

static mxChar _array80_[21] = { ':', ' ', ' ', 'P', 'o', 'p', 'u',
                                'l', 'a', 't', 'i', 'o', 'n', ' ',
                                'D', 'e', 'n', 's', 'i', 't', 'y' };
static mwArray _mxarray79_ = mclInitializeString(21, _array80_);

static mxChar _array82_[5] = { 'C', 'o', 'l', 'o', 'r' };
static mwArray _mxarray81_ = mclInitializeString(5, _array82_);

static mxChar _array84_[4] = { 'b', 'l', 'u', 'e' };
static mwArray _mxarray83_ = mclInitializeString(4, _array84_);

static mxChar _array86_[8] = { 'F', 'o', 'n', 't', 'S', 'i', 'z', 'e' };
static mwArray _mxarray85_ = mclInitializeString(8, _array86_);
static mwArray _mxarray87_ = mclInitializeDouble(10.0);

static mxChar _array89_[5] = { 'U', 'n', 'i', 't', 's' };
static mwArray _mxarray88_ = mclInitializeString(5, _array89_);

static mxChar _array91_[10] = { 'n', 'o', 'r', 'm', 'a',
                                'l', 'i', 'z', 'e', 'd' };
static mwArray _mxarray90_ = mclInitializeString(10, _array91_);
static mwArray _mxarray92_ = mclInitializeString(1, _array67_);

static mxChar _array94_[19] = { ':', ' ', ' ', 'T', 'o', 't', 'a',
                                'l', ' ', 'P', 'o', 'p', 'u', 'l',
                                'a', 't', 'i', 'o', 'n' };
static mwArray _mxarray93_ = mclInitializeString(19, _array94_);

static mxChar _array96_[23] = { 'S', 'i', 'm', 'u', 'l', 'a', 't', 'i',
                                'o', 'n', ' ', 'S', 't', 'o', 'p', ' ',
                                'B', 'y', ' ', 'U', 's', 'e', 'r' };
static mwArray _mxarray95_ = mclInitializeString(23, _array96_);

static mxChar _array98_[19] = { 'S', 'i', 'm', 'u', 'l', 'a', 't',
                                'i', 'o', 'n', ' ', 'F', 'i', 'n',
                                'i', 's', 'h', 'e', 'd' };
static mwArray _mxarray97_ = mclInitializeString(19, _array98_);

void InitializeModule_Start_hier_community() {
}

void TerminateModule_Start_hier_community() {
    mxDestroyArray(_mxarray70_);
    mxDestroyArray(_mxarray66_);
    mxDestroyArray(_mxarray63_);
}

static void MStart_hier_community(mwArray varargin);

_mexLocalFunctionTable _local_function_table_Start_hier_community
  = { 0, (mexFunctionTableEntry *)NULL };

//
// The function "Start_hier_community" contains the normal interface for the
// "Start_hier_community" M-function from file
// "C:\shu\hier_community_exe\Start_Hier_Community.m" (lines 1-251). This
// function processes any input arguments and passes them to the implementation
// version of the function, appearing above.
//
void Start_hier_community(mwVarargin varargin) {
    MStart_hier_community(varargin.ToArray());
}

//
// The function "mlxStart_hier_community" contains the feval interface for the
// "Start_hier_community" M-function from file
// "C:\shu\hier_community_exe\Start_Hier_Community.m" (lines 1-251). The feval
// function calls the implementation version of Start_hier_community through
// this function. This function processes any input arguments and passes them
// to the implementation version of the function, appearing above.
//
void mlxStart_hier_community(int nlhs,
                             mxArray * plhs[],
                             int nrhs,
                             mxArray * prhs[]) {
    MW_BEGIN_MLX();
    {
        mwArray mprhs[1];
        if (nlhs > 0) {
            error(_mxarray0_);
        }
        mprhs[0] = mclCreateVararginCell(nrhs, prhs);
        MStart_hier_community(mprhs[0]);
    }
    MW_END_MLX();
}

//
// The function "MStart_hier_community" is the implementation version of the
// "Start_hier_community" M-function from file
// "C:\shu\hier_community_exe\Start_Hier_Community.m" (lines 1-251). It
// contains the actual compiled code for that M-function. It is a static
// function and must only be called from one of the interface functions,
// appearing below.
//
//
// function Start_Hier_Community(varargin)
//
static void MStart_hier_community(mwArray varargin) {
    mwLocalFunctionTable save_local_function_table_
      (&_local_function_table_Start_hier_community);
    mwArray f(mclGetUninitializedArray());
    mwArray baby(mclGetUninitializedArray());
    mwArray B(mclGetUninitializedArray());
    mwArray d(mclGetUninitializedArray());
    mwArray m(mclGetUninitializedArray());
    mwArray b(mclGetUninitializedArray());
    mwArray g(mclGetUninitializedArray());
    mwArray c(mclGetUninitializedArray());
    mwArray num_stop(mclGetUninitializedArray());
    mwArray current_population(mclGetUninitializedArray());
    mwArray k(mclGetUninitializedArray());
    mwArray Ptotal(mclGetUninitializedArray());
    mwArray Pin(mclGetUninitializedArray());
    mwArray tpop(mclGetUninitializedArray());
    mwArray w(mclGetUninitializedArray());
    mwArray n(mclGetUninitializedArray());
    mwArray u(mclGetUninitializedArray());
    mwArray j(mclGetUninitializedArray());
    mwArray t_end(mclGetUninitializedArray());
    mwArray ts(mclGetUninitializedArray());
    mwArray t(mclGetUninitializedArray());
    mwArray t_begin(mclGetUninitializedArray());
    mwArray hierarchy(mclGetUninitializedArray());
    mwArray dt(mclGetUninitializedArray());
    mwArray xs(mclGetUninitializedArray());
    mwArray x(mclGetUninitializedArray());
    mwArray dx(mclGetUninitializedArray());
    mwArray w_pos(mclGetUninitializedArray());
    mwArray w_var(mclGetUninitializedArray());
    mwArray c_pos(mclGetUninitializedArray());
    mwArray c_var(mclGetUninitializedArray());
    mwArray b_pos(mclGetUninitializedArray());
    mwArray b_var(mclGetUninitializedArray());
    mwArray m_pos(mclGetUninitializedArray());
    mwArray m_var(mclGetUninitializedArray());
    mwArray g_pos(mclGetUninitializedArray());
    mwArray g_var(mclGetUninitializedArray());
    mwArray _T1_(mclGetUninitializedArray());
    mwArray uo_pos(mclGetUninitializedArray());
    mwArray _T0_(mclGetUninitializedArray());
    mwArray uo_var(mclGetUninitializedArray());
    mwArray Pvar(mclGetUninitializedArray());
    mwArray pos(mclGetUninitializedArray());
    mwArray gamma_string(mclGetUninitializedArray());
    mwArray w_f(mclGetUninitializedArray());
    mwArray c_f(mclGetUninitializedArray());
    mwArray b_f(mclGetUninitializedArray());
    mwArray m_f(mclGetUninitializedArray());
    mwArray g_f(mclGetUninitializedArray());
    mwArray uo_f(mclGetUninitializedArray());
    mwArray i(mclGetUninitializedArray());
    mwArray probability(mclGetUninitializedArray());
    mwArray pop_param(mclGetUninitializedArray());
    mwArray CONT(mclGetUninitializedArray());
    mwArray xintv(mclGetUninitializedArray());
    mwArray xmax(mclGetUninitializedArray());
    mwArray tsteps(mclGetUninitializedArray());
    mwArray tmax(mclGetUninitializedArray());
    mwArray num_pop(mclGetUninitializedArray());
    mwArray ans(mclGetUninitializedArray());
    mwArray cont_handle(mclGetUninitializedArray());
    mwArray axes_moment_handle(mclGetUninitializedArray());
    mwArray axes_density_handle(mclGetUninitializedArray());
    mwArray start_handle(mclGetUninitializedArray());
    mwArray status_bar_handle(mclGetUninitializedArray());
    mwArray number_of_x_intervals_handle(mclGetUninitializedArray());
    mwArray maximum_x_handle(mclGetUninitializedArray());
    mwArray number_of_time_steps_handle(mclGetUninitializedArray());
    mwArray maximum_time_handle(mclGetUninitializedArray());
    mwArray number_of_populations_handle(mclGetUninitializedArray());
    mwArray populations_handle(mclGetUninitializedArray());
    mwArray V(mclGetUninitializedArray());
    mwArray param(mclGetUninitializedArray());
    mwArray multiple_population_handle(mclGetUninitializedArray());
    //
    // 
    // multiple_population_handle = findobj('Tag','Fig_multiple_population');
    //
    multiple_population_handle = findobj(mwVarargin(_mxarray2_, _mxarray4_));
    //
    // 
    // param = get(multiple_population_handle,'UserData');
    //
    param
      = Nget(
          1,
          mwVarargin(
            mwVv(multiple_population_handle, "multiple_population_handle"),
            _mxarray6_));
    //
    // 
    // V = 15;
    //
    V = _mxarray8_;
    //
    // 
    // if(strcmp(param{1},'IDLE'))
    //
    if (tobool(
          mwVe(
            feval(
              mwValueVarargout(),
              mlxStrcmp,
              mwVarargin(
                mwVe(mwVsv(param, "param").cell(_mxarray9_)), _mxarray10_))))) {
        //
        // 
        // populations_handle = findobj(multiple_population_handle,'Tag','PopupMenu_populations');
        //
        populations_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray12_));
        //
        // number_of_populations_handle = findobj(multiple_population_handle,'Tag','EditText_number_of_populations');
        //
        number_of_populations_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray14_));
        //
        // maximum_time_handle = findobj(multiple_population_handle,'Tag','EditText_maximum_time');
        //
        maximum_time_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray16_));
        //
        // number_of_time_steps_handle = findobj(multiple_population_handle,'Tag','EditText_number_of_time_steps');
        //
        number_of_time_steps_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray18_));
        //
        // maximum_x_handle = findobj(multiple_population_handle,'Tag','EditText_maximum_x');
        //
        maximum_x_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray20_));
        //
        // number_of_x_intervals_handle = findobj(multiple_population_handle,'Tag','EditText_number_of_x_intervals');
        //
        number_of_x_intervals_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray22_));
        //
        // status_bar_handle = findobj(multiple_population_handle,'Tag','StaticText_status_bar');
        //
        status_bar_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray24_));
        //
        // start_handle = findobj(multiple_population_handle,'Tag','Pushbutton_start');
        //
        start_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray26_));
        //
        // axes_density_handle = findobj(multiple_population_handle,'Tag','Axes_population_density');
        //
        axes_density_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray28_));
        //
        // axes_moment_handle = findobj(multiple_population_handle,'Tag','Axes_population_moment');
        //
        axes_moment_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray30_));
        //
        // cont_handle = findobj(multiple_population_handle,'Tag','Radiobutton_cont');
        //
        cont_handle
          = findobj(
              mwVarargin(
                mwVv(multiple_population_handle, "multiple_population_handle"),
                _mxarray2_,
                _mxarray32_));
        //
        // 
        // set(status_bar_handle,'String','Initializing');
        //
        ans.EqAns(
          Nset(
            0,
            mwVarargin(
              mwVv(status_bar_handle, "status_bar_handle"),
              _mxarray34_,
              _mxarray36_)));
        //
        // 
        // num_pop = str2num(get(number_of_populations_handle,'String'));
        //
        num_pop
          = str2num(
              mwVe(
                Nget(
                  1,
                  mwVarargin(
                    mwVv(
                      number_of_populations_handle,
                      "number_of_populations_handle"),
                    _mxarray34_))));
        //
        // tmax = str2num(get(maximum_time_handle,'String'));
        //
        tmax
          = str2num(
              mwVe(
                Nget(
                  1,
                  mwVarargin(
                    mwVv(maximum_time_handle, "maximum_time_handle"),
                    _mxarray34_))));
        //
        // tsteps = str2num(get(number_of_time_steps_handle,'String'));
        //
        tsteps
          = str2num(
              mwVe(
                Nget(
                  1,
                  mwVarargin(
                    mwVv(
                      number_of_time_steps_handle,
                      "number_of_time_steps_handle"),
                    _mxarray34_))));
        //
        // xmax = str2num(get(maximum_x_handle,'String'));
        //
        xmax
          = str2num(
              mwVe(
                Nget(
                  1,
                  mwVarargin(
                    mwVv(maximum_x_handle, "maximum_x_handle"),
                    _mxarray34_))));
        //
        // xintv = str2num(get(number_of_x_intervals_handle,'String'));
        //
        xintv
          = str2num(
              mwVe(
                Nget(
                  1,
                  mwVarargin(
                    mwVv(
                      number_of_x_intervals_handle,
                      "number_of_x_intervals_handle"),
                    _mxarray34_))));
        //
        // CONT = get(cont_handle,'Value');
        //
        CONT
          = Nget(1, mwVarargin(mwVv(cont_handle, "cont_handle"), _mxarray38_));
        //
        // 
        // param{1} = 'ACTIVE';
        //
        param.cell(_mxarray9_) = _mxarray40_;
        //
        // set(multiple_population_handle,'UserData',param);
        //
        ans.EqAns(
          Nset(
            0,
            mwVarargin(
              mwVv(multiple_population_handle, "multiple_population_handle"),
              _mxarray6_,
              mwVv(param, "param"))));
        //
        // pop_param = param{3};
        //
        pop_param = mwVsv(param, "param").cell(_mxarray42_);
        //
        // probability=zeros(num_pop,num_pop);
        //
        probability
          = zeros(
              mwVarargin(mwVv(num_pop, "num_pop"), mwVv(num_pop, "num_pop")));
        //
        // 
        // for i = 1:num_pop
        //
        {
            int v_(mclForIntStart(1));
            int e_(mclForIntEnd(mwVv(num_pop, "num_pop")));
            if (v_ > e_) {
                i = _mxarray43_;
            } else {
                //
                // uo_f{i} = getfield(pop_param(i),'uo');
                // g_f{i} = getfield(pop_param(i),'g');
                // m_f{i} = getfield(pop_param(i),'m');
                // b_f{i} = getfield(pop_param(i),'b');
                // c_f{i} = getfield(pop_param(i),'c');
                // w_f{i} = getfield(pop_param(i),'w');
                // gamma_string{i} = getfield(pop_param(i),'gam');
                // 
                // if(~CONT)
                // pos = findstr(w_f{i},'<=');
                // w_f{i}(pos+1)='';
                // end
                // Pvar{i} = ['P',num2str(i)];
                // end
                //
                for (; ; ) {
                    uo_f.cell(v_)
                    = getfield(
                        mwVe(
                          mclIntArrayRef(mwVsv(pop_param, "pop_param"), v_)),
                        mwVarargin(_mxarray44_));
                    g_f.cell(v_)
                    = getfield(
                        mwVe(
                          mclIntArrayRef(mwVsv(pop_param, "pop_param"), v_)),
                        mwVarargin(_mxarray46_));
                    m_f.cell(v_)
                    = getfield(
                        mwVe(
                          mclIntArrayRef(mwVsv(pop_param, "pop_param"), v_)),
                        mwVarargin(_mxarray48_));
                    b_f.cell(v_)
                    = getfield(
                        mwVe(
                          mclIntArrayRef(mwVsv(pop_param, "pop_param"), v_)),
                        mwVarargin(_mxarray50_));
                    c_f.cell(v_)
                    = getfield(
                        mwVe(
                          mclIntArrayRef(mwVsv(pop_param, "pop_param"), v_)),
                        mwVarargin(_mxarray52_));
                    w_f.cell(v_)
                    = getfield(
                        mwVe(
                          mclIntArrayRef(mwVsv(pop_param, "pop_param"), v_)),
                        mwVarargin(_mxarray54_));
                    gamma_string.cell(v_)
                    = getfield(
                        mwVe(
                          mclIntArrayRef(mwVsv(pop_param, "pop_param"), v_)),
                        mwVarargin(_mxarray56_));
                    if (mclNotBool(mwVv(CONT, "CONT"))) {
                        pos
                          = feval(
                              mwValueVarargout(),
                              mlxFindstr,
                              mwVarargin(
                                mwVe(mwVsv(w_f, "w_f").cell(v_)),
                                _mxarray58_));
                        w_f.cell(v_)(mwVv(pos, "pos") + _mxarray9_)
                        = mwEmptySqBracket();
                    }
                    Pvar.cell(v_)
                    = horzcat(
                        mwVarargin(_mxarray60_, mwVe(num2str(mwArray(v_)))));
                    if (v_ == e_) {
                        break;
                    }
                    ++v_;
                }
                i = v_;
            }
        }
        //
        // 
        // for i = 1:num_pop
        //
        {
            int v_(mclForIntStart(1));
            int e_(mclForIntEnd(mwVv(num_pop, "num_pop")));
            if (v_ > e_) {
                i = _mxarray43_;
            } else {
                //
                // [uo_var{i},uo_pos{i}] = Find_Var(uo_f{i},{'x'}); 
                // [g_var{i},g_pos{i}] = Find_Var(g_f{i},[{'x'},Pvar]); 
                // [m_var{i},m_pos{i}] = Find_Var(m_f{i},[{'x'},Pvar]); 
                // [b_var{i},b_pos{i}] = Find_Var(b_f{i},[{'x'},Pvar]); 
                // [c_var{i},c_pos{i}] = Find_Var(c_f{i},{'t'}); 
                // [w_var{i},w_pos{i}] = Find_Var(w_f{i},{'x','y'});
                // probability(i,1:end)=str2num(gamma_string{i});
                // end
                //
                for (; ; ) {
                    _T0_ = v_;
                    _T1_ = v_;
                    feval(
                      mwVarargout(uo_var.cell(_T0_), uo_pos.cell(_T1_)),
                      mlxFind_Var,
                      mwVarargin(
                        mwVe(mwVsv(uo_f, "uo_f").cell(v_)), _mxarray62_));
                    _T0_ = v_;
                    _T1_ = v_;
                    feval(
                      mwVarargout(g_var.cell(_T0_), g_pos.cell(_T1_)),
                      mlxFind_Var,
                      mwVarargin(
                        mwVe(mwVsv(g_f, "g_f").cell(v_)),
                        horzcat(mwVarargin(_mxarray62_, mwVv(Pvar, "Pvar")))));
                    _T0_ = v_;
                    _T1_ = v_;
                    feval(
                      mwVarargout(m_var.cell(_T0_), m_pos.cell(_T1_)),
                      mlxFind_Var,
                      mwVarargin(
                        mwVe(mwVsv(m_f, "m_f").cell(v_)),
                        horzcat(mwVarargin(_mxarray62_, mwVv(Pvar, "Pvar")))));
                    _T0_ = v_;
                    _T1_ = v_;
                    feval(
                      mwVarargout(b_var.cell(_T0_), b_pos.cell(_T1_)),
                      mlxFind_Var,
                      mwVarargin(
                        mwVe(mwVsv(b_f, "b_f").cell(v_)),
                        horzcat(mwVarargin(_mxarray62_, mwVv(Pvar, "Pvar")))));
                    _T0_ = v_;
                    _T1_ = v_;
                    feval(
                      mwVarargout(c_var.cell(_T0_), c_pos.cell(_T1_)),
                      mlxFind_Var,
                      mwVarargin(
                        mwVe(mwVsv(c_f, "c_f").cell(v_)), _mxarray65_));
                    _T0_ = v_;
                    _T1_ = v_;
                    feval(
                      mwVarargout(w_var.cell(_T0_), w_pos.cell(_T1_)),
                      mlxFind_Var,
                      mwVarargin(
                        mwVe(mwVsv(w_f, "w_f").cell(v_)), _mxarray68_));
                    mclArrayAssign(
                      &probability,
                      feval(
                        mwValueVarargout(),
                        mlxStr2num,
                        mwVarargin(
                          mwVe(mwVsv(gamma_string, "gamma_string").cell(v_)))),
                      v_,
                      colon(
                        _mxarray9_,
                        end(
                          mwVv(probability, "probability"),
                          _mxarray72_,
                          _mxarray72_)));
                    if (v_ == e_) {
                        break;
                    }
                    ++v_;
                }
                i = v_;
            }
        }
        //
        // 
        // dx = xmax/xintv;
        //
        dx = mwVv(xmax, "xmax") / mwVv(xintv, "xintv");
        //
        // x=0:dx:xmax;
        //
        x = colon(_mxarray73_, mwVv(dx, "dx"), mwVv(xmax, "xmax"));
        //
        // for i=1:length(x)
        //
        {
            int v_(mclForIntStart(1));
            int e_(mclForIntEnd(mwArray(mclLengthInt(mwVv(x, "x")))));
            if (v_ > e_) {
                i = _mxarray43_;
            } else {
                //
                // xs{i}=num2str(x(i),V);
                // end
                //
                for (; ; ) {
                    xs.cell(v_)
                    = num2str(
                        mwVe(mclIntArrayRef(mwVsv(x, "x"), v_)), mwVv(V, "V"));
                    if (v_ == e_) {
                        break;
                    }
                    ++v_;
                }
                i = v_;
            }
        }
        //
        // dt = tmax/tsteps;
        //
        dt = mwVv(tmax, "tmax") / mwVv(tsteps, "tsteps");
        //
        // 
        // for i=1:num_pop
        //
        {
            int v_(mclForIntStart(1));
            int e_(mclForIntEnd(mwVv(num_pop, "num_pop")));
            if (v_ > e_) {
                i = _mxarray43_;
            } else {
                //
                // hierarchy(i)=any(strcmp('x',w_var{i}));
                // end
                //
                for (; ; ) {
                    mclIntArrayAssign(
                      &hierarchy,
                      any(
                        mwVe(
                          feval(
                            mwValueVarargout(),
                            mlxStrcmp,
                            mwVarargin(
                              _mxarray74_,
                              mwVe(mwVsv(w_var, "w_var").cell(v_)))))),
                      v_);
                    if (v_ == e_) {
                        break;
                    }
                    ++v_;
                }
                i = v_;
            }
        }
        //
        // 
        // if(isempty(varargin))
        //
        if (tobool(mwVe(isempty(mwVa(varargin, "varargin"))))) {
            //
            // 
            // t_begin = 1;
            //
            t_begin = _mxarray9_;
            //
            // dt = tmax/tsteps;
            //
            dt = mwVv(tmax, "tmax") / mwVv(tsteps, "tsteps");
            //
            // t=0:dt:tmax;
            //
            t = colon(_mxarray73_, mwVv(dt, "dt"), mwVv(tmax, "tmax"));
            //
            // for i = 1:length(t)
            //
            {
                int v_(mclForIntStart(1));
                int e_(mclForIntEnd(mwArray(mclLengthInt(mwVv(t, "t")))));
                if (v_ > e_) {
                    i = _mxarray43_;
                } else {
                    //
                    // ts{i} = num2str(t(i),V);
                    // end
                    //
                    for (; ; ) {
                        ts.cell(v_)
                        = num2str(
                            mwVe(mclIntArrayRef(mwVsv(t, "t"), v_)),
                            mwVv(V, "V"));
                        if (v_ == e_) {
                            break;
                        }
                        ++v_;
                    }
                    i = v_;
                }
            }
            //
            // t_end = tsteps;
            //
            t_end = mwVsv(tsteps, "tsteps");
            //
            // 
            // for i = 1:num_pop
            //
            {
                int v_(mclForIntStart(1));
                int e_(mclForIntEnd(mwVv(num_pop, "num_pop")));
                if (v_ > e_) {
                    i = _mxarray43_;
                } else {
                    //
                    // 
                    // for j = 1:xintv+1
                    // u{i}(1,j) = MyInline(uo_f{i},{'x'},xs(j),uo_var{i},uo_pos{i});
                    // 
                    // if(hierarchy(i))
                    // for n = 1:xintv+1
                    // w{i}(j,n) = MyInline(w_f{i},{'x','y'},[xs(j),xs(n)],w_var{i},w_pos{i});
                    // end
                    // else
                    // w{i}(1:xintv+1,j)=MyInline(w_f{i},{'y'},xs(j),w_var{i},w_pos{i});
                    // end
                    // end
                    // 
                    // for j = 1:xintv+1
                    // if (CONT)
                    // tpop = dx*(sum(w{i}(j,2:end).*u{i}(1,2:end)));
                    // else
                    // tpop = dx*(sum(w{i}(j,2:end).*u{i}(1,2:end))); 
                    // end
                    // Pin{i,j} = num2str(tpop,V);
                    // Ptotal{i}(t_begin,j)= tpop;
                    // end
                    // end
                    //
                    for (; ; ) {
                        int v_0(mclForIntStart(1));
                        int e_0
                          (mclForIntEnd(mwVv(xintv, "xintv") + _mxarray9_));
                        if (v_0 > e_0) {
                            j = _mxarray43_;
                        } else {
                            for (; ; ) {
                                u.cell(v_)(_mxarray9_, v_0)
                                = feval(
                                    mwValueVarargout(),
                                    mlxMyInline,
                                    mwVarargin(
                                      mwVe(mwVsv(uo_f, "uo_f").cell(v_)),
                                      _mxarray62_,
                                      mwVe(
                                        mclIntArrayRef(mwVsv(xs, "xs"), v_0)),
                                      mwVe(mwVsv(uo_var, "uo_var").cell(v_)),
                                      mwVe(mwVsv(uo_pos, "uo_pos").cell(v_))));
                                if (tobool(
                                      mwVe(
                                        mclIntArrayRef(
                                          mwVsv(hierarchy, "hierarchy"),
                                          v_)))) {
                                    int v_1(mclForIntStart(1));
                                    int e_1
                                      (mclForIntEnd(
                                         mwVv(xintv, "xintv") + _mxarray9_));
                                    if (v_1 > e_1) {
                                        n = _mxarray43_;
                                    } else {
                                        for (; ; ) {
                                            w.cell(v_)(v_0, v_1)
                                            = feval(
                                                mwValueVarargout(),
                                                mlxMyInline,
                                                mwVarargin(
                                                  mwVe(
                                                    mwVsv(w_f, "w_f").cell(
                                                      v_)),
                                                  _mxarray68_,
                                                  horzcat(
                                                    mwVarargin(
                                                      mwVe(
                                                        mclIntArrayRef(
                                                          mwVsv(xs, "xs"),
                                                          v_0)),
                                                      mwVe(
                                                        mclIntArrayRef(
                                                          mwVsv(xs, "xs"),
                                                          v_1)))),
                                                  mwVe(
                                                    mwVsv(w_var, "w_var").cell(
                                                      v_)),
                                                  mwVe(
                                                    mwVsv(w_pos, "w_pos").cell(
                                                      v_))));
                                            if (v_1 == e_1) {
                                                break;
                                            }
                                            ++v_1;
                                        }
                                        n = v_1;
                                    }
                                } else {
                                    w.cell(v_)(
                                      colon(
                                        _mxarray9_,
                                        mwVv(xintv, "xintv") + _mxarray9_),
                                      v_0)
                                    = feval(
                                        mwValueVarargout(),
                                        mlxMyInline,
                                        mwVarargin(
                                          mwVe(mwVsv(w_f, "w_f").cell(v_)),
                                          _mxarray75_,
                                          mwVe(
                                            mclIntArrayRef(
                                              mwVsv(xs, "xs"), v_0)),
                                          mwVe(mwVsv(w_var, "w_var").cell(v_)),
                                          mwVe(
                                            mwVsv(w_pos, "w_pos").cell(v_))));
                                }
                                if (v_0 == e_0) {
                                    break;
                                }
                                ++v_0;
                            }
                            j = v_0;
                        }
                        {
                            int v_2(mclForIntStart(1));
                            int e_2
                              (mclForIntEnd(mwVv(xintv, "xintv") + _mxarray9_));
                            if (v_2 > e_2) {
                                j = _mxarray43_;
                            } else {
                                for (; ; ) {
                                    if (tobool(mwVv(CONT, "CONT"))) {
                                        _T0_ = v_;
                                        _T1_ = v_;
                                        tpop
                                          = mwVv(dx, "dx")
                                            * mwVe(
                                                sum(
                                                  feval(
                                                    mwValueVarargout(),
                                                    mlxTimes,
                                                    mwVarargin(
                                                      mwVe(
                                                        mwVsv(w, "w").cell(
                                                          _T0_)(
                                                          v_2,
                                                          colon(
                                                            _mxarray72_,
                                                            feval(
                                                              mwValueVarargout(),
                                                              mlxEnd,
                                                              mwVarargin(
                                                                mwVe(
                                                                  mwVsv(
                                                                    w,
                                                                    "w").cell(
                                                                    _T0_)),
                                                                _mxarray72_,
                                                                _mxarray72_))))),
                                                      mwVe(
                                                        mwVsv(u, "u").cell(
                                                          _T1_)(
                                                          _mxarray9_,
                                                          colon(
                                                            _mxarray72_,
                                                            feval(
                                                              mwValueVarargout(),
                                                              mlxEnd,
                                                              mwVarargin(
                                                                mwVe(
                                                                  mwVsv(
                                                                    u,
                                                                    "u").cell(
                                                                    _T1_)),
                                                                _mxarray72_,
                                                                _mxarray72_)))))))));
                                    } else {
                                        _T0_ = v_;
                                        _T1_ = v_;
                                        tpop
                                          = mwVv(dx, "dx")
                                            * mwVe(
                                                sum(
                                                  feval(
                                                    mwValueVarargout(),
                                                    mlxTimes,
                                                    mwVarargin(
                                                      mwVe(
                                                        mwVsv(w, "w").cell(
                                                          _T0_)(
                                                          v_2,
                                                          colon(
                                                            _mxarray72_,
                                                            feval(
                                                              mwValueVarargout(),
                                                              mlxEnd,
                                                              mwVarargin(
                                                                mwVe(
                                                                  mwVsv(
                                                                    w,
                                                                    "w").cell(
                                                                    _T0_)),
                                                                _mxarray72_,
                                                                _mxarray72_))))),
                                                      mwVe(
                                                        mwVsv(u, "u").cell(
                                                          _T1_)(
                                                          _mxarray9_,
                                                          colon(
                                                            _mxarray72_,
                                                            feval(
                                                              mwValueVarargout(),
                                                              mlxEnd,
                                                              mwVarargin(
                                                                mwVe(
                                                                  mwVsv(
                                                                    u,
                                                                    "u").cell(
                                                                    _T1_)),
                                                                _mxarray72_,
                                                                _mxarray72_)))))))));
                                    }
                                    Pin.cell(v_, v_2)
                                    = num2str(
                                        mwVv(tpop, "tpop"), mwVv(V, "V"));
                                    Ptotal.cell(v_)(
                                      mwVsv(t_begin, "t_begin"), v_2)
                                    = mwVsv(tpop, "tpop");
                                    if (v_2 == e_2) {
                                        break;
                                    }
                                    ++v_2;
                                }
                                j = v_2;
                            }
                        }
                        if (v_ == e_) {
                            break;
                        }
                        ++v_;
                    }
                    i = v_;
                }
            }
        //
        // 
        // else
        //
        } else {
            //
            // 
            // u = param{4}{3};
            //
            u = mwVsv(param, "param").cell(_mxarray76_).cell(_mxarray42_);
            //
            // Ptotal=param{4}{4};
            //
            Ptotal = mwVsv(param, "param").cell(_mxarray76_).cell(_mxarray76_);
            //
            // for i=1:num_pop
            //
            {
                int v_(mclForIntStart(1));
                int e_(mclForIntEnd(mwVv(num_pop, "num_pop")));
                if (v_ > e_) {
                    i = _mxarray43_;
                } else {
                    //
                    // for j=1:xintv+1
                    // if(hierarchy(i))
                    // for n=1:xintv+1
                    // w{i}(j,n)=MyInline(w_f{i},{'x','y'},[xs(j),xs(n)],w_var{i},w_pos{i});
                    // end
                    // else
                    // w{i}(1:xintv+1,j)=MyInline(w_f{i},{'y'},xs(j),w_var{i},w_pos{i});
                    // end
                    // end
                    // for j = 1:xintv+1
                    // if (CONT)
                    // tpop = dx*(sum(w{i}(j,2:end).*u{i}(end,2:end)));
                    // else
                    // tpop = dx*(sum(w{i}(j,2:end).*u{i}(end,2:end))); 
                    // end
                    // Pin{i,j} = num2str(tpop,V);
                    // Ptotal{i}(end,j)= tpop;
                    // end
                    // end
                    //
                    for (; ; ) {
                        int v_3(mclForIntStart(1));
                        int e_3
                          (mclForIntEnd(mwVv(xintv, "xintv") + _mxarray9_));
                        if (v_3 > e_3) {
                            j = _mxarray43_;
                        } else {
                            for (; ; ) {
                                if (tobool(
                                      mwVe(
                                        mclIntArrayRef(
                                          mwVsv(hierarchy, "hierarchy"),
                                          v_)))) {
                                    int v_4(mclForIntStart(1));
                                    int e_4
                                      (mclForIntEnd(
                                         mwVv(xintv, "xintv") + _mxarray9_));
                                    if (v_4 > e_4) {
                                        n = _mxarray43_;
                                    } else {
                                        for (; ; ) {
                                            w.cell(v_)(v_3, v_4)
                                            = feval(
                                                mwValueVarargout(),
                                                mlxMyInline,
                                                mwVarargin(
                                                  mwVe(
                                                    mwVsv(w_f, "w_f").cell(
                                                      v_)),
                                                  _mxarray68_,
                                                  horzcat(
                                                    mwVarargin(
                                                      mwVe(
                                                        mclIntArrayRef(
                                                          mwVsv(xs, "xs"),
                                                          v_3)),
                                                      mwVe(
                                                        mclIntArrayRef(
                                                          mwVsv(xs, "xs"),
                                                          v_4)))),
                                                  mwVe(
                                                    mwVsv(w_var, "w_var").cell(
                                                      v_)),
                                                  mwVe(
                                                    mwVsv(w_pos, "w_pos").cell(
                                                      v_))));
                                            if (v_4 == e_4) {
                                                break;
                                            }
                                            ++v_4;
                                        }
                                        n = v_4;
                                    }
                                } else {
                                    w.cell(v_)(
                                      colon(
                                        _mxarray9_,
                                        mwVv(xintv, "xintv") + _mxarray9_),
                                      v_3)
                                    = feval(
                                        mwValueVarargout(),
                                        mlxMyInline,
                                        mwVarargin(
                                          mwVe(mwVsv(w_f, "w_f").cell(v_)),
                                          _mxarray75_,
                                          mwVe(
                                            mclIntArrayRef(
                                              mwVsv(xs, "xs"), v_3)),
                                          mwVe(mwVsv(w_var, "w_var").cell(v_)),
                                          mwVe(
                                            mwVsv(w_pos, "w_pos").cell(v_))));
                                }
                                if (v_3 == e_3) {
                                    break;
                                }
                                ++v_3;
                            }
                            j = v_3;
                        }
                        {
                            int v_5(mclForIntStart(1));
                            int e_5
                              (mclForIntEnd(mwVv(xintv, "xintv") + _mxarray9_));
                            if (v_5 > e_5) {
                                j = _mxarray43_;
                            } else {
                                for (; ; ) {
                                    if (tobool(mwVv(CONT, "CONT"))) {
                                        _T0_ = v_;
                                        _T1_ = v_;
                                        tpop
                                          = mwVv(dx, "dx")
                                            * mwVe(
                                                sum(
                                                  feval(
                                                    mwValueVarargout(),
                                                    mlxTimes,
                                                    mwVarargin(
                                                      mwVe(
                                                        mwVsv(w, "w").cell(
                                                          _T0_)(
                                                          v_5,
                                                          colon(
                                                            _mxarray72_,
                                                            feval(
                                                              mwValueVarargout(),
                                                              mlxEnd,
                                                              mwVarargin(
                                                                mwVe(
                                                                  mwVsv(
                                                                    w,
                                                                    "w").cell(
                                                                    _T0_)),
                                                                _mxarray72_,
                                                                _mxarray72_))))),
                                                      mwVe(
                                                        mwVsv(u, "u").cell(
                                                          _T1_)(
                                                          feval(
                                                            mwValueVarargout(),
                                                            mlxEnd,
                                                            mwVarargin(
                                                              mwVe(
                                                                mwVsv(
                                                                  u,
                                                                  "u").cell(
                                                                  _T1_)),
                                                              _mxarray9_,
                                                              _mxarray72_)),
                                                          colon(
                                                            _mxarray72_,
                                                            feval(
                                                              mwValueVarargout(),
                                                              mlxEnd,
                                                              mwVarargin(
                                                                mwVe(
                                                                  mwVsv(
                                                                    u,
                                                                    "u").cell(
                                                                    _T1_)),
                                                                _mxarray72_,
                                                                _mxarray72_)))))))));
                                    } else {
                                        _T0_ = v_;
                                        _T1_ = v_;
                                        tpop
                                          = mwVv(dx, "dx")
                                            * mwVe(
                                                sum(
                                                  feval(
                                                    mwValueVarargout(),
                                                    mlxTimes,
                                                    mwVarargin(
                                                      mwVe(
                                                        mwVsv(w, "w").cell(
                                                          _T0_)(
                                                          v_5,
                                                          colon(
                                                            _mxarray72_,
                                                            feval(
                                                              mwValueVarargout(),
                                                              mlxEnd,
                                                              mwVarargin(
                                                                mwVe(
                                                                  mwVsv(
                                                                    w,
                                                                    "w").cell(
                                                                    _T0_)),
                                                                _mxarray72_,
                                                                _mxarray72_))))),
                                                      mwVe(
                                                        mwVsv(u, "u").cell(
                                                          _T1_)(
                                                          feval(
                                                            mwValueVarargout(),
                                                            mlxEnd,
                                                            mwVarargin(
                                                              mwVe(
                                                                mwVsv(
                                                                  u,
                                                                  "u").cell(
                                                                  _T1_)),
                                                              _mxarray9_,
                                                              _mxarray72_)),
                                                          colon(
                                                            _mxarray72_,
                                                            feval(
                                                              mwValueVarargout(),
                                                              mlxEnd,
                                                              mwVarargin(
                                                                mwVe(
                                                                  mwVsv(
                                                                    u,
                                                                    "u").cell(
                                                                    _T1_)),
                                                                _mxarray72_,
                                                                _mxarray72_)))))))));
                                    }
                                    Pin.cell(v_, v_5)
                                    = num2str(
                                        mwVv(tpop, "tpop"), mwVv(V, "V"));
                                    _T0_ = v_;
                                    Ptotal.cell(_T0_)(
                                      feval(
                                        mwValueVarargout(),
                                        mlxEnd,
                                        mwVarargin(
                                          mwVe(
                                            mwVsv(Ptotal, "Ptotal").cell(_T0_)),
                                          _mxarray9_,
                                          _mxarray72_)),
                                      v_5)
                                    = mwVsv(tpop, "tpop");
                                    if (v_5 == e_5) {
                                        break;
                                    }
                                    ++v_5;
                                }
                                j = v_5;
                            }
                        }
                        if (v_ == e_) {
                            break;
                        }
                        ++v_;
                    }
                    i = v_;
                }
            }
            //
            // t_begin = length(u{1}(:,1));
            //
            t_begin
              = feval(
                  mwValueVarargout(),
                  mlxLength,
                  mwVarargin(
                    mwVe(
                      mwVsv(u, "u").cell(_mxarray9_)(colon(), _mxarray9_))));
            //
            // t=0:dt:(t_begin+tsteps)*dt;
            //
            t
              = colon(
                  _mxarray73_,
                  mwVv(dt, "dt"),
                  (mwVv(t_begin, "t_begin") + mwVv(tsteps, "tsteps"))
                  * mwVv(dt, "dt"));
            //
            // for i = 1:length(t)
            //
            {
                int v_(mclForIntStart(1));
                int e_(mclForIntEnd(mwArray(mclLengthInt(mwVv(t, "t")))));
                if (v_ > e_) {
                    i = _mxarray43_;
                } else {
                    //
                    // ts{i} = num2str(t(i),V);
                    // end
                    //
                    for (; ; ) {
                        ts.cell(v_)
                        = num2str(
                            mwVe(mclIntArrayRef(mwVsv(t, "t"), v_)),
                            mwVv(V, "V"));
                        if (v_ == e_) {
                            break;
                        }
                        ++v_;
                    }
                    i = v_;
                }
            }
            //
            // t_end = t_begin+tsteps;
            //
            t_end = mwVv(t_begin, "t_begin") + mwVv(tsteps, "tsteps");
        //
        // end
        //
        }
        //
        // 
        // for k = t_begin : t_end
        //
        {
            mwForLoopIterator viter__;
            for (viter__.Start(
                   mwVv(t_begin, "t_begin"),
                   mwVv(t_end, "t_end"),
                   mwArray::DIN);
                 viter__.Next(&k);
                 ) {
                //
                // 
                // set(status_bar_handle,'String',num2str(k));
                //
                ans.EqAns(
                  Nset(
                    0,
                    mwVarargin(
                      mwVv(status_bar_handle, "status_bar_handle"),
                      _mxarray34_,
                      mwVe(num2str(mwVv(k, "k"))))));
                //
                // drawnow;
                //
                drawnow(mwArray::DIN);
                //
                // 
                // param = get(multiple_population_handle,'UserData');
                //
                param
                  = Nget(
                      1,
                      mwVarargin(
                        mwVv(
                          multiple_population_handle,
                          "multiple_population_handle"),
                        _mxarray6_));
                //
                // if(strcmp(param{1},'IDLE'))
                //
                if (tobool(
                      mwVe(
                        feval(
                          mwValueVarargout(),
                          mlxStrcmp,
                          mwVarargin(
                            mwVe(mwVsv(param, "param").cell(_mxarray9_)),
                            _mxarray10_))))) {
                    //
                    // param{1} = 'IDLE';
                    //
                    param.cell(_mxarray9_) = _mxarray10_;
                    //
                    // current_population = get(populations_handle,'Value');
                    //
                    current_population
                      = Nget(
                          1,
                          mwVarargin(
                            mwVv(populations_handle, "populations_handle"),
                            _mxarray38_));
                    //
                    // num_stop=length(u{current_population}(:,1));
                    //
                    num_stop
                      = feval(
                          mwValueVarargout(),
                          mlxLength,
                          mwVarargin(
                            mwVe(
                              mwVsv(u, "u").cell(
                                mwVsv(
                                  current_population, "current_population"))(
                                colon(), _mxarray9_))));
                    //
                    // param{4} = {x,t(1:num_stop),u,Ptotal};
                    //
                    param.cell(_mxarray76_)
                    = cellhcat(
                        mwVarargin(
                          mwVv(x, "x"),
                          mwVe(
                            mclArrayRef(
                              mwVsv(t, "t"),
                              colon(_mxarray9_, mwVv(num_stop, "num_stop")))),
                          mwVv(u, "u"),
                          mwVv(Ptotal, "Ptotal")));
                    //
                    // set(multiple_population_handle,'UserData',param);
                    //
                    ans.EqAns(
                      Nset(
                        0,
                        mwVarargin(
                          mwVv(
                            multiple_population_handle,
                            "multiple_population_handle"),
                          _mxarray6_,
                          mwVv(param, "param"))));
                    //
                    // 
                    // axes(axes_density_handle);
                    //
                    ans.EqAns(
                      Naxes(
                        0,
                        mwVarargin(
                          mwVv(axes_density_handle, "axes_density_handle"))));
                    //
                    // cla;
                    //
                    ans.EqAns(Ncla(0, mwVarargin()));
                    //
                    // mesh(x,t(1:num_stop),u{current_population})
                    //
                    ans.EqPrintAns(
                      Nmesh(
                        0,
                        mwVarargin(
                          mwVv(x, "x"),
                          mwVe(
                            mclArrayRef(
                              mwVsv(t, "t"),
                              colon(_mxarray9_, mwVv(num_stop, "num_stop")))),
                          mwVe(
                            mwVsv(u, "u").cell(
                              mwVsv(
                                current_population, "current_population"))))));
                    //
                    // title(['Population ',num2str(current_population),':  Population Density'],...
                    //
                    ans.EqAns(
                      Ntitle(
                        0,
                        horzcat(
                          mwVarargin(
                            _mxarray77_,
                            mwVe(
                              num2str(
                                mwVv(
                                  current_population, "current_population"))),
                            _mxarray79_)),
                        mwVarargin(
                          _mxarray81_,
                          _mxarray83_,
                          _mxarray85_,
                          _mxarray87_,
                          _mxarray88_,
                          _mxarray90_)));
                    //
                    // 'Color','blue','FontSize',10,'Units','normalized');
                    // xlabel('x');
                    //
                    ans.EqAns(Nxlabel(0, _mxarray74_, mwVarargin()));
                    //
                    // ylabel('t');
                    //
                    ans.EqAns(Nylabel(0, _mxarray92_, mwVarargin()));
                    //
                    // set(axes_density_handle,'Tag','Axes_population_density');
                    //
                    ans.EqAns(
                      Nset(
                        0,
                        mwVarargin(
                          mwVv(axes_density_handle, "axes_density_handle"),
                          _mxarray2_,
                          _mxarray28_)));
                    //
                    // 
                    // axes(axes_moment_handle);
                    //
                    ans.EqAns(
                      Naxes(
                        0,
                        mwVarargin(
                          mwVv(axes_moment_handle, "axes_moment_handle"))));
                    //
                    // cla;
                    //
                    ans.EqAns(Ncla(0, mwVarargin()));
                    //
                    // if (hierarchy(current_population))
                    //
                    if (tobool(
                          mwVe(
                            mclArrayRef(
                              mwVsv(hierarchy, "hierarchy"),
                              mwVsv(
                                current_population, "current_population"))))) {
                        //
                        // mesh(x,t(1:num_stop),Ptotal{current_population})
                        //
                        ans.EqPrintAns(
                          Nmesh(
                            0,
                            mwVarargin(
                              mwVv(x, "x"),
                              mwVe(
                                mclArrayRef(
                                  mwVsv(t, "t"),
                                  colon(
                                    _mxarray9_, mwVv(num_stop, "num_stop")))),
                              mwVe(
                                mwVsv(Ptotal, "Ptotal").cell(
                                  mwVsv(
                                    current_population,
                                    "current_population"))))));
                        //
                        // xlabel('x');
                        //
                        ans.EqAns(Nxlabel(0, _mxarray74_, mwVarargin()));
                        //
                        // ylabel('t');
                        //
                        ans.EqAns(Nylabel(0, _mxarray92_, mwVarargin()));
                    //
                    // else
                    //
                    } else {
                        //
                        // plot(t(1:num_stop),Ptotal{current_population}(:,1))
                        //
                        ans.EqPrintAns(
                          Nplot(
                            0,
                            mwVarargin(
                              mwVe(
                                mclArrayRef(
                                  mwVsv(t, "t"),
                                  colon(
                                    _mxarray9_, mwVv(num_stop, "num_stop")))),
                              mwVe(
                                mwVsv(Ptotal, "Ptotal").cell(
                                  mwVsv(
                                    current_population, "current_population"))(
                                  colon(), _mxarray9_)))));
                        //
                        // xlabel('t');
                        //
                        ans.EqAns(Nxlabel(0, _mxarray92_, mwVarargin()));
                    //
                    // end
                    //
                    }
                    //
                    // title(['Population ',num2str(current_population),':  Total Population'],...
                    //
                    ans.EqAns(
                      Ntitle(
                        0,
                        horzcat(
                          mwVarargin(
                            _mxarray77_,
                            mwVe(
                              num2str(
                                mwVv(
                                  current_population, "current_population"))),
                            _mxarray93_)),
                        mwVarargin(
                          _mxarray81_,
                          _mxarray83_,
                          _mxarray85_,
                          _mxarray87_,
                          _mxarray88_,
                          _mxarray90_)));
                    //
                    // 'Color','blue','FontSize',10,'Units','normalized');
                    // set(axes_moment_handle,'Tag','Axes_population_moment'); 
                    //
                    ans.EqAns(
                      Nset(
                        0,
                        mwVarargin(
                          mwVv(axes_moment_handle, "axes_moment_handle"),
                          _mxarray2_,
                          _mxarray30_)));
                    //
                    // 
                    // set(status_bar_handle,'String','Simulation Stop By User');
                    //
                    ans.EqAns(
                      Nset(
                        0,
                        mwVarargin(
                          mwVv(status_bar_handle, "status_bar_handle"),
                          _mxarray34_,
                          _mxarray95_)));
                    //
                    // return;
                    //
                    goto return_;
                //
                // end
                //
                }
                //
                // 
                // for i = 1:num_pop
                //
                {
                    int v_(mclForIntStart(1));
                    int e_(mclForIntEnd(mwVv(num_pop, "num_pop")));
                    if (v_ > e_) {
                        i = _mxarray43_;
                    } else {
                        //
                        // 
                        // c{i} = MyInline(c_f{i},{'t'},ts(k),c_var{i},c_pos{i});
                        // for j = 1:xintv+1
                        // g{i}(j) = MyInline(g_f{i},[{'x'},Pvar],[xs(j),Pin(:,j)'],g_var{i},g_pos{i});     
                        // b{i}(j) = MyInline(b_f{i},[{'x'},Pvar],[xs(j),Pin(:,j)'],b_var{i},b_pos{i});
                        // m{i}(j) = MyInline(m_f{i},[{'x'},Pvar],[xs(j),Pin(:,j)'],m_var{i},m_pos{i});
                        // d{i}(j) = 1 + dt*g{i}(j)/dx + dt*m{i}(j);
                        // end
                        // 
                        // end
                        //
                        for (; ; ) {
                            c.cell(v_)
                            = feval(
                                mwValueVarargout(),
                                mlxMyInline,
                                mwVarargin(
                                  mwVe(mwVsv(c_f, "c_f").cell(v_)),
                                  _mxarray65_,
                                  mwVe(
                                    mclArrayRef(
                                      mwVsv(ts, "ts"), mwVsv(k, "k"))),
                                  mwVe(mwVsv(c_var, "c_var").cell(v_)),
                                  mwVe(mwVsv(c_pos, "c_pos").cell(v_))));
                            {
                                int v_6(mclForIntStart(1));
                                int e_6
                                  (mclForIntEnd(
                                     mwVv(xintv, "xintv") + _mxarray9_));
                                if (v_6 > e_6) {
                                    j = _mxarray43_;
                                } else {
                                    for (; ; ) {
                                        g.cell(v_)(v_6)
                                        = feval(
                                            mwValueVarargout(),
                                            mlxMyInline,
                                            mwVarargin(
                                              mwVe(mwVsv(g_f, "g_f").cell(v_)),
                                              horzcat(
                                                mwVarargin(
                                                  _mxarray62_,
                                                  mwVv(Pvar, "Pvar"))),
                                              horzcat(
                                                mwVarargin(
                                                  mwVe(
                                                    mclIntArrayRef(
                                                      mwVsv(xs, "xs"), v_6)),
                                                  ctranspose(
                                                    mwVe(
                                                      mclArrayRef(
                                                        mwVsv(Pin, "Pin"),
                                                        colon(),
                                                        v_6))))),
                                              mwVe(
                                                mwVsv(g_var, "g_var").cell(
                                                  v_)),
                                              mwVe(
                                                mwVsv(g_pos, "g_pos").cell(
                                                  v_))));
                                        b.cell(v_)(v_6)
                                        = feval(
                                            mwValueVarargout(),
                                            mlxMyInline,
                                            mwVarargin(
                                              mwVe(mwVsv(b_f, "b_f").cell(v_)),
                                              horzcat(
                                                mwVarargin(
                                                  _mxarray62_,
                                                  mwVv(Pvar, "Pvar"))),
                                              horzcat(
                                                mwVarargin(
                                                  mwVe(
                                                    mclIntArrayRef(
                                                      mwVsv(xs, "xs"), v_6)),
                                                  ctranspose(
                                                    mwVe(
                                                      mclArrayRef(
                                                        mwVsv(Pin, "Pin"),
                                                        colon(),
                                                        v_6))))),
                                              mwVe(
                                                mwVsv(b_var, "b_var").cell(
                                                  v_)),
                                              mwVe(
                                                mwVsv(b_pos, "b_pos").cell(
                                                  v_))));
                                        m.cell(v_)(v_6)
                                        = feval(
                                            mwValueVarargout(),
                                            mlxMyInline,
                                            mwVarargin(
                                              mwVe(mwVsv(m_f, "m_f").cell(v_)),
                                              horzcat(
                                                mwVarargin(
                                                  _mxarray62_,
                                                  mwVv(Pvar, "Pvar"))),
                                              horzcat(
                                                mwVarargin(
                                                  mwVe(
                                                    mclIntArrayRef(
                                                      mwVsv(xs, "xs"), v_6)),
                                                  ctranspose(
                                                    mwVe(
                                                      mclArrayRef(
                                                        mwVsv(Pin, "Pin"),
                                                        colon(),
                                                        v_6))))),
                                              mwVe(
                                                mwVsv(m_var, "m_var").cell(
                                                  v_)),
                                              mwVe(
                                                mwVsv(m_pos, "m_pos").cell(
                                                  v_))));
                                        d.cell(v_)(v_6)
                                        = _mxarray9_
                                          + feval(
                                              mwValueVarargout(),
                                              mlxMtimes,
                                              mwVarargin(
                                                mwVv(dt, "dt"),
                                                mwVe(
                                                  mwVsv(g, "g").cell(v_)(
                                                    v_6))))
                                            / mwVv(dx, "dx")
                                          + feval(
                                              mwValueVarargout(),
                                              mlxMtimes,
                                              mwVarargin(
                                                mwVv(dt, "dt"),
                                                mwVe(
                                                  mwVsv(m, "m").cell(v_)(
                                                    v_6))));
                                        if (v_6 == e_6) {
                                            break;
                                        }
                                        ++v_6;
                                    }
                                    j = v_6;
                                }
                            }
                            if (v_ == e_) {
                                break;
                            }
                            ++v_;
                        }
                        i = v_;
                    }
                }
                //
                // 
                // 
                // for i=1:num_pop
                //
                {
                    int v_(mclForIntStart(1));
                    int e_(mclForIntEnd(mwVv(num_pop, "num_pop")));
                    if (v_ > e_) {
                        i = _mxarray43_;
                    } else {
                        //
                        // B(1,1)=g{i}(1);
                        // for j=1:xintv
                        // B(j+1,j)=-dt/dx*g{i}(j);
                        // B(j+1,j+1)=d{i}(j+1);
                        // end
                        // baby=0;
                        // for j=1:num_pop
                        // baby=baby+dx*probability(i,j)*sum(b{j}(2:end).*u{j}(k,2:end));
                        // end
                        // f=[c{i}+baby,u{i}(k,2:end)]';
                        // u{i}(k+1,:)=(B\f)';
                        // 
                        // for j = 1:xintv+1
                        // if(CONT)
                        // tpop = dx*(sum(w{i}(j,2:end).*u{i}(k+1,2:end)));
                        // else
                        // tpop = dx*(sum(w{i}(j,2:end).*u{i}(k+1,2:end))); 
                        // end
                        // Pin{i,j} = num2str(tpop,V);
                        // Ptotal{i}(k+1,j)= tpop;
                        // end
                        // end
                        //
                        for (; ; ) {
                            mclIntArrayAssign(
                              &B, mwVsv(g, "g").cell(v_)(_mxarray9_), 1, 1);
                            {
                                int v_7(mclForIntStart(1));
                                int e_7(mclForIntEnd(mwVv(xintv, "xintv")));
                                if (v_7 > e_7) {
                                    j = _mxarray43_;
                                } else {
                                    for (; ; ) {
                                        mclIntArrayAssign(
                                          &B,
                                          feval(
                                            mwValueVarargout(),
                                            mlxMtimes,
                                            mwVarargin(
                                              - mwVv(dt, "dt") / mwVv(dx, "dx"),
                                              mwVe(
                                                mwVsv(g, "g").cell(v_)(v_7)))),
                                          v_7 + 1,
                                          v_7);
                                        mclIntArrayAssign(
                                          &B,
                                          mwVsv(d, "d").cell(v_)(v_7 + 1),
                                          v_7 + 1,
                                          v_7 + 1);
                                        if (v_7 == e_7) {
                                            break;
                                        }
                                        ++v_7;
                                    }
                                    j = v_7;
                                }
                            }
                            baby = _mxarray73_;
                            {
                                int v_8(mclForIntStart(1));
                                int e_8(mclForIntEnd(mwVv(num_pop, "num_pop")));
                                if (v_8 > e_8) {
                                    j = _mxarray43_;
                                } else {
                                    for (; ; ) {
                                        _T0_ = v_8;
                                        _T1_ = v_8;
                                        baby
                                          = mwVv(baby, "baby")
                                            + mwVv(dx, "dx")
                                              * mwVe(
                                                  mclIntArrayRef(
                                                    mwVsv(
                                                      probability,
                                                      "probability"),
                                                    v_,
                                                    v_8))
                                              * mwVe(
                                                  sum(
                                                    feval(
                                                      mwValueVarargout(),
                                                      mlxTimes,
                                                      mwVarargin(
                                                        mwVe(
                                                          mwVsv(b, "b").cell(
                                                            _T0_)(
                                                            colon(
                                                              _mxarray72_,
                                                              feval(
                                                                mwValueVarargout(),
                                                                mlxEnd,
                                                                mwVarargin(
                                                                  mwVe(
                                                                    mwVsv(
                                                                      b,
                                                                      "b").cell(
                                                                      _T0_)),
                                                                  _mxarray9_,
                                                                  _mxarray9_))))),
                                                        mwVe(
                                                          mwVsv(u, "u").cell(
                                                            _T1_)(
                                                            mwVsv(k, "k"),
                                                            colon(
                                                              _mxarray72_,
                                                              feval(
                                                                mwValueVarargout(),
                                                                mlxEnd,
                                                                mwVarargin(
                                                                  mwVe(
                                                                    mwVsv(
                                                                      u,
                                                                      "u").cell(
                                                                      _T1_)),
                                                                  _mxarray72_,
                                                                  _mxarray72_)))))))));
                                        if (v_8 == e_8) {
                                            break;
                                        }
                                        ++v_8;
                                    }
                                    j = v_8;
                                }
                            }
                            _T0_ = v_;
                            f
                              = ctranspose(
                                  horzcat(
                                    mwVarargin(
                                      feval(
                                        mwValueVarargout(),
                                        mlxPlus,
                                        mwVarargin(
                                          mwVe(mwVsv(c, "c").cell(v_)),
                                          mwVv(baby, "baby"))),
                                      mwVe(
                                        mwVsv(u, "u").cell(_T0_)(
                                          mwVsv(k, "k"),
                                          colon(
                                            _mxarray72_,
                                            feval(
                                              mwValueVarargout(),
                                              mlxEnd,
                                              mwVarargin(
                                                mwVe(mwVsv(u, "u").cell(_T0_)),
                                                _mxarray72_,
                                                _mxarray72_))))))));
                            u.cell(v_)(mwVv(k, "k") + _mxarray9_, colon())
                            = ctranspose(mldivide(mwVv(B, "B"), mwVv(f, "f")));
                            {
                                int v_9(mclForIntStart(1));
                                int e_9
                                  (mclForIntEnd(
                                     mwVv(xintv, "xintv") + _mxarray9_));
                                if (v_9 > e_9) {
                                    j = _mxarray43_;
                                } else {
                                    for (; ; ) {
                                        if (tobool(mwVv(CONT, "CONT"))) {
                                            _T0_ = v_;
                                            _T1_ = v_;
                                            tpop
                                              = mwVv(dx, "dx")
                                                * mwVe(
                                                    sum(
                                                      feval(
                                                        mwValueVarargout(),
                                                        mlxTimes,
                                                        mwVarargin(
                                                          mwVe(
                                                            mwVsv(
                                                              w, "w").cell(
                                                              _T0_)(
                                                              v_9,
                                                              colon(
                                                                _mxarray72_,
                                                                feval(
                                                                  mwValueVarargout(),
                                                                  mlxEnd,
                                                                  mwVarargin(
                                                                    mwVe(
                                                                      mwVsv(
                                                                        w,
                                                                        "w").cell(
                                                                        _T0_)),
                                                                    _mxarray72_,
                                                                    _mxarray72_))))),
                                                          mwVe(
                                                            mwVsv(
                                                              u, "u").cell(
                                                              _T1_)(
                                                              mwVv(k, "k")
                                                              + _mxarray9_,
                                                              colon(
                                                                _mxarray72_,
                                                                feval(
                                                                  mwValueVarargout(),
                                                                  mlxEnd,
                                                                  mwVarargin(
                                                                    mwVe(
                                                                      mwVsv(
                                                                        u,
                                                                        "u").cell(
                                                                        _T1_)),
                                                                    _mxarray72_,
                                                                    _mxarray72_)))))))));
                                        } else {
                                            _T0_ = v_;
                                            _T1_ = v_;
                                            tpop
                                              = mwVv(dx, "dx")
                                                * mwVe(
                                                    sum(
                                                      feval(
                                                        mwValueVarargout(),
                                                        mlxTimes,
                                                        mwVarargin(
                                                          mwVe(
                                                            mwVsv(
                                                              w, "w").cell(
                                                              _T0_)(
                                                              v_9,
                                                              colon(
                                                                _mxarray72_,
                                                                feval(
                                                                  mwValueVarargout(),
                                                                  mlxEnd,
                                                                  mwVarargin(
                                                                    mwVe(
                                                                      mwVsv(
                                                                        w,
                                                                        "w").cell(
                                                                        _T0_)),
                                                                    _mxarray72_,
                                                                    _mxarray72_))))),
                                                          mwVe(
                                                            mwVsv(
                                                              u, "u").cell(
                                                              _T1_)(
                                                              mwVv(k, "k")
                                                              + _mxarray9_,
                                                              colon(
                                                                _mxarray72_,
                                                                feval(
                                                                  mwValueVarargout(),
                                                                  mlxEnd,
                                                                  mwVarargin(
                                                                    mwVe(
                                                                      mwVsv(
                                                                        u,
                                                                        "u").cell(
                                                                        _T1_)),
                                                                    _mxarray72_,
                                                                    _mxarray72_)))))))));
                                        }
                                        Pin.cell(v_, v_9)
                                        = num2str(
                                            mwVv(tpop, "tpop"), mwVv(V, "V"));
                                        Ptotal.cell(v_)(
                                          mwVv(k, "k") + _mxarray9_, v_9)
                                        = mwVsv(tpop, "tpop");
                                        if (v_9 == e_9) {
                                            break;
                                        }
                                        ++v_9;
                                    }
                                    j = v_9;
                                }
                            }
                            if (v_ == e_) {
                                break;
                            }
                            ++v_;
                        }
                        i = v_;
                    }
                }
            //
            // 
            // end
            //
            }
        }
        //
        // 
        // 
        // param{1} = 'IDLE';
        //
        param.cell(_mxarray9_) = _mxarray10_;
        //
        // param{4} = {x,t,u,Ptotal};
        //
        param.cell(_mxarray76_)
        = cellhcat(
            mwVarargin(
              mwVv(x, "x"),
              mwVv(t, "t"),
              mwVv(u, "u"),
              mwVv(Ptotal, "Ptotal")));
        //
        // set(multiple_population_handle,'UserData',param);
        //
        ans.EqAns(
          Nset(
            0,
            mwVarargin(
              mwVv(multiple_population_handle, "multiple_population_handle"),
              _mxarray6_,
              mwVv(param, "param"))));
        //
        // current_population = get(populations_handle,'Value');
        //
        current_population
          = Nget(
              1,
              mwVarargin(
                mwVv(populations_handle, "populations_handle"), _mxarray38_));
        //
        // 
        // axes(axes_density_handle);
        //
        ans.EqAns(
          Naxes(
            0, mwVarargin(mwVv(axes_density_handle, "axes_density_handle"))));
        //
        // cla;
        //
        ans.EqAns(Ncla(0, mwVarargin()));
        //
        // mesh(x,t,u{current_population})
        //
        ans.EqPrintAns(
          Nmesh(
            0,
            mwVarargin(
              mwVv(x, "x"),
              mwVv(t, "t"),
              mwVe(
                mwVsv(u, "u").cell(
                  mwVsv(current_population, "current_population"))))));
        //
        // title(['Population ',num2str(current_population),':  Population Density'],...
        //
        ans.EqAns(
          Ntitle(
            0,
            horzcat(
              mwVarargin(
                _mxarray77_,
                mwVe(num2str(mwVv(current_population, "current_population"))),
                _mxarray79_)),
            mwVarargin(
              _mxarray81_,
              _mxarray83_,
              _mxarray85_,
              _mxarray87_,
              _mxarray88_,
              _mxarray90_)));
        //
        // 'Color','blue','FontSize',10,'Units','normalized');
        // xlabel('x');
        //
        ans.EqAns(Nxlabel(0, _mxarray74_, mwVarargin()));
        //
        // ylabel('t');
        //
        ans.EqAns(Nylabel(0, _mxarray92_, mwVarargin()));
        //
        // set(axes_density_handle,'Tag','Axes_population_density');
        //
        ans.EqAns(
          Nset(
            0,
            mwVarargin(
              mwVv(axes_density_handle, "axes_density_handle"),
              _mxarray2_,
              _mxarray28_)));
        //
        // 
        // axes(axes_moment_handle);
        //
        ans.EqAns(
          Naxes(0, mwVarargin(mwVv(axes_moment_handle, "axes_moment_handle"))));
        //
        // cla;
        //
        ans.EqAns(Ncla(0, mwVarargin()));
        //
        // if (hierarchy(current_population))
        //
        if (tobool(
              mwVe(
                mclArrayRef(
                  mwVsv(hierarchy, "hierarchy"),
                  mwVsv(current_population, "current_population"))))) {
            //
            // mesh(x,t,Ptotal{current_population})
            //
            ans.EqPrintAns(
              Nmesh(
                0,
                mwVarargin(
                  mwVv(x, "x"),
                  mwVv(t, "t"),
                  mwVe(
                    mwVsv(Ptotal, "Ptotal").cell(
                      mwVsv(current_population, "current_population"))))));
            //
            // xlabel('x');
            //
            ans.EqAns(Nxlabel(0, _mxarray74_, mwVarargin()));
            //
            // ylabel('t');
            //
            ans.EqAns(Nylabel(0, _mxarray92_, mwVarargin()));
        //
        // else
        //
        } else {
            //
            // plot(t,Ptotal{current_population}(:,1))
            //
            ans.EqPrintAns(
              Nplot(
                0,
                mwVarargin(
                  mwVv(t, "t"),
                  mwVe(
                    mwVsv(Ptotal, "Ptotal").cell(
                      mwVsv(current_population, "current_population"))(
                      colon(), _mxarray9_)))));
            //
            // xlabel('t');
            //
            ans.EqAns(Nxlabel(0, _mxarray92_, mwVarargin()));
        //
        // end
        //
        }
        //
        // title(['Population ',num2str(current_population),':  Total Population'],...
        //
        ans.EqAns(
          Ntitle(
            0,
            horzcat(
              mwVarargin(
                _mxarray77_,
                mwVe(num2str(mwVv(current_population, "current_population"))),
                _mxarray93_)),
            mwVarargin(
              _mxarray81_,
              _mxarray83_,
              _mxarray85_,
              _mxarray87_,
              _mxarray88_,
              _mxarray90_)));
        //
        // 'Color','blue','FontSize',10,'Units','normalized');
        // set(axes_moment_handle,'Tag','Axes_population_moment');
        //
        ans.EqAns(
          Nset(
            0,
            mwVarargin(
              mwVv(axes_moment_handle, "axes_moment_handle"),
              _mxarray2_,
              _mxarray30_)));
        //
        // 
        // set(status_bar_handle,'String','Simulation Finished');
        //
        ans.EqAns(
          Nset(
            0,
            mwVarargin(
              mwVv(status_bar_handle, "status_bar_handle"),
              _mxarray34_,
              _mxarray97_)));
    //
    // end
    //
    }
    return_:;
}
