From 9af60f5498937a1ac3615a2a3f5fa9a555e3077f Mon Sep 17 00:00:00 2001 From: Jiw-Wen Tsai <44721885+jiewenTsai@users.noreply.github.com> Date: Wed, 25 Dec 2024 18:20:25 +0800 Subject: [PATCH] Update SimTools.jl --- src/SimTools.jl | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/SimTools.jl b/src/SimTools.jl index 7ce4465..c0e809c 100644 --- a/src/SimTools.jl +++ b/src/SimTools.jl @@ -498,10 +498,18 @@ end """ """ function getMetrics(object; par=:a) - vectorTrue = object[:True][Symbol(par)] - vectorEsti = Array{Any}(undef, length(vectorTrue), 100) - for i in 1:100 - vectorEsti[:,i] = object[i][Symbol(par)] + if par == (:β) + vectorTrue = object[:True][Symbol(par)] + vectorEsti = Array{Any}(undef, length(vectorTrue), 100) + for i in 1:100 + vectorEsti[:,i] = object[i][Symbol(par)][2:end] + end + else + vectorTrue = object[:True][Symbol(par)] + vectorEsti = Array{Any}(undef, length(vectorTrue), 100) + for i in 1:100 + vectorEsti[:,i] = object[i][Symbol(par)] + end end Metrics = ( @@ -518,10 +526,18 @@ end """ """ function getMetrics2(object; par=:a) - vectorTrue = object[:True][Symbol(par)] - vectorEsti = Array{Any}(undef, length(vectorTrue), 100) - for i in 1:100 - vectorEsti[:,i] = object[i][Symbol(par)] + if par == (:β) + vectorTrue = object[:True][Symbol(par)] + vectorEsti = Array{Any}(undef, length(vectorTrue), 100) + for i in 1:100 + vectorEsti[:,i] = object[i][Symbol(par)][2:end] + end + else + vectorTrue = object[:True][Symbol(par)] + vectorEsti = Array{Any}(undef, length(vectorTrue), 100) + for i in 1:100 + vectorEsti[:,i] = object[i][Symbol(par)] + end end Metrics = (