Skip to content

Commit

Permalink
Create uqlabClient.m
Browse files Browse the repository at this point in the history
Added the UQLab client example
  • Loading branch information
monabraeunig authored Oct 10, 2024
1 parent a6ca90e commit ddba1dd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions clients/matlab/uqlabClient.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
%% Using the UQLab client together with UM-Bridge

addpath(fullfile('\YOUR\FULL\PATH\TO\UMBRIDGE\INSTALLATION', 'matlab')) % modify with the correct path
model = HTTPModel('http://localhost:4243', 'forward');

% The following lines create the corresponding UQLab model object:
ModelOpts.mHandle = @(X) model.evaluate(X);
EulerBernoulliBeamModel = uq_createModel(ModelOpts);

% Additional parameters can also be passed to the model, see the UQLab User
% Manual: The Model Module, Section 2.1.4
% (https://uqftp.ethz.ch/uqlab_doc_pdf/2.1.0/UserManual_Model.pdf).

% The model can now be evaluated for one or more sets of input parameters.
% For example, the three-dimensional Euler-Bernoulli beam model with
% parameter space [1.00 ,1.05]^3 can be evaluated at two parameter sets as
% follows:
X = [1.00, 1.00, 1.01; ...
1.04, 1.01, 1.05];
Y = uq_evalModel(EulerBernoulliBeamModel, X);

0 comments on commit ddba1dd

Please sign in to comment.