From 3f1312b7bf0926a8efe409367823e4370e02f289 Mon Sep 17 00:00:00 2001 From: herrTilda <tilda.herrgardh@gmail.com> Date: Wed, 20 Jan 2021 19:13:47 +0100 Subject: [PATCH] for uncertainties --- scripts/sampleParams.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 scripts/sampleParams.m diff --git a/scripts/sampleParams.m b/scripts/sampleParams.m new file mode 100644 index 0000000..65dfaa6 --- /dev/null +++ b/scripts/sampleParams.m @@ -0,0 +1,13 @@ + +function [sampledParams] = sampleParams(nsets,allParams) + +% allocation +np=size(allParams,2)-1; +sets=floor(linspace(1,size(allParams,1),nsets)); +sampledParams=nan(nsets,np); + +% sample +allParams=sortrows(allParams,(np+1)); +sampledParams(:,:)=allParams(sets,1:np); + +end -- GitLab