After I install the app and load the experimental TDS data. When I push the "Fit model" button, the matlab shows the following errors. Can anyone help me how to use the app correctly?

Function or variable 'function_error' is not recognized.

Error Fit_traps

Error particleswarm>makeState (line 846)
firstFval = objFcn(state.Positions(numInitialSwarmFvals+1,: ) );
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
Error particleswarm>pswcore (line 191)
state = makeState(nvars,lbMatrix,ubMatrix,objFcn,options);
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
Error particleswarm (line 166)
[x,fval,exitFlag,output,points] = pswcore(objFcn,nvars,lbRow,ubRow,output,options);
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
Error Fit_traps

Error TDS_app/FitmodelButtonPushed (line 1945)
param = Fit_traps(x_experiment,y_experiment,model_sol,param,ntt,optimization,PROJECT_TDS.updateH,PROJECT_TDS.model_out_ver,secon dcolumnexp);
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
Error appdesigner. Internal. Service. AppManagementService/executeCallback (line 165)
callback(appOrUserComponent, event);
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
Matlab error. Apps. AppBase > @ (source, event) executeCallback (ams, app, callback, requiresEventData, event) (6)
newCallback = @(source, event)executeCallback(ams, ...
^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^

Error using appdesservices. Internal. Interfaces. Model. AbstractModel/executeUserCallback (line 282)
An error occurred calculating the Button PrivateButtonPushedFcn.

a month later

Dear Swordyh,

Many thanks for your comment. We detected errors related to the definition of absolute directories when calling certain functions. We resolved this issue in the latest version of the code.

Let us know if the errors have disappeared.

Cheers,
Enrique GM.

    2 months later

    EnriqueGM Thank you for the reply. Where can I download the latest version of the TDS Simulator?

      swordyh It is on the website (1.03). Download this version and let us know if the error continues

        6 days later

        admin After loading the experimental data and click "fit model" button, there are still some error:
        Unrecognized function or variable 'nanmean'.

        Error in function_error

        Error in Fit_traps

        Error in particleswarm>makeState (line 846)
        firstFval = objFcn(state.Positions(numInitialSwarmFvals+1,🙂);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        Error in particleswarm>pswcore (line 191)
        state = makeState(nvars,lbMatrix,ubMatrix,objFcn,options);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        Error in particleswarm (line 166)
        [x,fval,exitFlag,output,points] = pswcore(objFcn,nvars,lbRow,ubRow,output,options);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        Error in Fit_traps

        Error in TDS_app/FitmodelButtonPushed (line 1948)
        param = Fit_traps(x_experiment,y_experiment,model_sol,param,ntt,optimization,PROJECT_TDS.updateH,PROJECT_TDS.model_out_ver,secondcolumnexp);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        Error in appdesigner.internal.service.AppManagementService/executeCallback (line 165)
        callback(appOrUserComponent, event);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        Error in matlab.apps.AppBase>@(source,event)executeCallback(ams,app,callback,requiresEventData,event) (line 60)
        newCallback = @(source, event)executeCallback(ams, ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        Error using appdesservices.internal.interfaces.model.AbstractModel/executeUserCallback (line 282)
        Error while evaluating Button PrivateButtonPushedFcn.

        This has been discussed in the forum before. It seems that you don't have no access to the "nanmean" function, which is part of the Statistics toolbox of Matlab.

          Powered by: FreeFlarum.
          (remove this footer)