codes/matlab/manage_samples.m


%
% (c) Copyright 2008, SimLab, All Rights Reserved.
% Joint Research Center of the European Commission
% This file is subject to the SimLab License
% You will find a copy of the license at:
% http://simlab.jrc.it/licenses
%

% =
% distributions for the model inputs
addFacNorm('pressure',0,1,0.05,0.95,'Pascal')
addFacNorm('temperature',300,20,0.05,0.95,'Kelvin')
addFacNorm('humidity',0.97,0.03,0.05,0.95,'g/m^3')

%first argument = seed
%second argument = number of sample points
setMethodRandom(899547543,1000)

%create a 1000x3 sample matrix
sample = createSample

%save the sample configuration in a file specified by the user
saveSampleCfg('sample_config.sam')



%loads the sample configuration file into the simlab workspace
loadSampleCfg('sample_config.sam')

%extract the sample from the Simlab workspace and store it in variable 'x'

%extract the number of sample points from the workspace