Jesse Chao in MATLAB Answers
最後のアクティビティ: 2023 年 6 月 3 日

Hello team, I am trying to learn Bayesian parameter estimation in Simbiology from the shared file form the MatLab file exchange. After I ran the driver_PCSK9_script.m script, I would like to commit the best fit to the model and further carry out the best fitted simulation with following code. cs = getconfigset(pcsk9Model); variants_temp = sbiovariant('Variant'); variants_content = cell(1,height(mhSampler.ParameterEstimates)); for i = 1:numel(variants_content) param_name = split(mhSampler.ParameterEstimates.Parameter(i),'.'); param = sbioselect(pcsk9Model,'Where','Name','regexpi',param_name(end)); variants_content{i} = {param.Type,param.Name,'Value',mhSampler.ParameterEstimates{i,2}}; end variants_temp.Content = variants_content; commit(variants_temp,pcsk9Model) However, an error occured on the last line showed: Error using SimBiology.Variant/commit Component 'CholesterolIntakeDiet' does not exist in the model. Error in untitled8 (line 19) commit(variants_temp,pcsk9Model) Then I checked with the pcsk9Model model and I found that when I excuted "pcsk9Model" in the command line, I saw there are 47 parameters including parameter 'CholesterolIntakeDiet'. I also opened the model in the SimBiology Model Builder and was able to find parameter 'CholesterolIntakeDiet'. However, when I clicked into the pcsk9Model in the Workspace, it only showed 29 parameters. (showed in photo below) Do not know why and how this could happen or if have any misunderstanding of the model. Could you please showed me what could cause this problem and how to resolve it? Thank you very mch. Jesse