rozsasarpi / Code-calibration-Belarus

Reliability-based code calibration for steel structures considering ultimate limit states - Belarus, Eurocode
MIT License
1 stars 1 forks source link

Error: File: calibrate.m Line: 195 Column: 23 Identifier 'Beta' is not a function or a shared variable. #1

Closed rozsasarpi closed 2 years ago

rozsasarpi commented 2 years ago

When running main.m the following error is raised:

Error: File: calibrate.m Line: 195 Column: 23
Identifier 'Beta' is not a function or a shared variable. To share 'Beta' with a nested function, initialize it in the
current scope. For more information, see Sharing Variables Between Parent and Nested Functions.

Error in main (line 66)
Results = calibrate(Model)

Reported by @Jungle-13.

Jungle-13 commented 2 years ago

Yeah, Sir,with your help I solved the first problem. But now running the main.m file, the following error appears: Unrecognized function or variable gumbelinvcdf.

Error in prob_model (line 84)
     Probvar.Q.char = gumbelinvcdf(Q_t.P_rep, Q_t.mean*Q_t.bias, Q_t.std, 'mom');

Error in calibrate/obj_fun (line 164)
                     Probvar_o = prob_model(kk,jj,ii,Model);

Error in fmincon (line 567)
       initVals.f = feval(funfcn{3},X,varargin{:});

Error in fmultistart

Error in MultiStart/run (line 257)
                fmultistart(problem,startPointSets,msoptions);

Error in calibrate (line 112)
[partial_f, O, ~, ~, manymins] = run(ms,problem,100);

Error in main (line 66)
Results = calibrate(Model)
rozsasarpi commented 2 years ago

It is a custom dependency that you need to add to your path: https://github.com/rozsasarpi/Statistics---Matlab/blob/68f4bb1c7f042182095045c875472a1f16a1054a/distribution_functions/univariate/gumbel_max/gumbelinvcdf.m

I expect that a few more functions will be needed from the linked repository so it is probably the most convenient to add the entire distribution_functions/univariate/ folder to your path.

Jungle-13 commented 2 years ago

Yeah,Sir. I have solved this problem, thank you very much for your patient and detailed answer. Zhangong Wang

------------------ 原始邮件 ------------------ 发件人: "rozsasarpi/Code-calibration-Belarus" @.>; 发送时间: 2022年1月15日(星期六) 下午3:48 @.>; @.**@.>; 主题: Re: [rozsasarpi/Code-calibration-Belarus] Error: File: calibrate.m Line: 195 Column: 23 Identifier 'Beta' is not a function or a shared variable. (Issue #1)

It is a custom dependency that you need to add to your path: https://github.com/rozsasarpi/Statistics---Matlab/blob/68f4bb1c7f042182095045c875472a1f16a1054a/distribution_functions/univariate/gumbel_max/gumbelinvcdf.m

I expect that a few more functions will be needed from the linked repository so it is probably the most convenient to add the entire distribution_functions/univariate/ folder to your path.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>