function SF = RFmodel(X,Parameters)

z = Parameters.z;
mu = Parameters.mu;
sigma = Parameters.sigma;
theta = Parameters.theta;
myUQLinkModel = Parameters.myUQLinkModel;

%% RF generation

RF_cu = RF_Gen_Func(X(1:20),z,mu,sigma,theta); % Generates RF of cu (undrained shear strength) of size [1 X 20].

%% File .inp generation

MODinp_txt(RF_cu(20:-1:1)); % Generation of the .inp file according to RF_cu. 
% The .inp file has the name 'IS_RF.inp.tpl.inp'. It also contains <X0001>.

SF = uq_evalModel(myUQLinkModel,X(21)); % Replaces <X0001> in the .inp with the random value and runs the file.

end

