How to install UQLab?

This post will walk you through the installation of UQLab. The installation steps below assume that you’ve obtained the UQLab package (in a zip file) and the UQLabCore license file by email, after successfully following the registration process.

Table of contents


Installation steps

  1. Unzip the downloaded package in a folder, say myUQLabFolder.
  2. Store the license file (attached to your license email) inside the subfolder myUQLabFolder/core.
  3. Open MATLAB and select myUQLabFolder as the working directory.
  4. Type uqlab_install in the MATLAB command window and wait until the installation process is finished. During installation process, UQLabCore will automatically download and install the latest version of the UQLab modules.
  5. Type in uqlab in the command window to run UQLab. A splash screen will be shown indicating that UQLab has been successfully loaded.

Live internet connection required. When running UQLab into a new MATLAB session, make sure you have a live internet connection to verify your license with the license server.

>> uqlab
Copyright 2013-2019, Stefano Marelli and Bruno Sudret, all rights reserved.
This is UQLabCore, version 1.2.0
UQLabCore may not be reproduced, displayed, modified or redistributed
without the express prior written permission of the copyright holder(s).
To request special permissions, please contact:
  - Stefano Marelli (marelli@ibk.baug.ethz.ch).

Useful commands to get started with UQLab:
uqlab -doc         - Access the available documentation
uqlab -help        - Additional help on how to get started with UQLab
uq_citation help   - Information on how to cite UQLab in publications
uq_sendFeedback    - Report bugs, suggestions, enhancement requests, etc. 

Both UQLabCore and UQLabModules are already up-to date.

Keeping UQLab up-to-date. Every time you run UQLab in a new MATLAB session, UQLab will check for updates. If an update is available, either for UQLabCore or the modules, you will be prompted.

Installation self-testing

Once UQLab has been installed using the above procedure, you can test your UQLab installation by typing uqlab -selftest in the MATLAB command window. A full suite of self-test routines will be executed (this may take up to several minutes on a standard computer). If everything is OK, a message will confirm that the tests are successful.

>> uqlab -selftest
Testing component: uq_reliability...   [OK]
Testing component: uq_sensitivity...   [OK]
Testing component: uq_default_input... [OK]
Testing component: uq_default_model... [OK]
Testing component: uq_metamodel...     [OK]
Testing component: uq_uqlink... [OK]

 --- UQLab selftest results ---

+ uq_selftest_uq_reliability            [OK]
+ uq_selftest_uq_sensitivity            [OK]
+ uq_selftest_uq_default_input          [OK]
+ uq_selftest_uq_default_model          [OK]
+ uq_selftest_uq_metamodel              [OK]
+ uq_selftest_uq_uqlink         [OK]

Installation subfolders

After the installation process, the UQLab sources are organized into several folders within your myUQLabFolder:

  • /core contains the core routines, including the memory handling and licensing subsystems.
  • /Doc contains the UQLab user manuals in PDF format. Each module has its own manual.
  • /Examples contains MATLAB script files of UQLab Examples. They are organized into subfolders according to the type of analysis addressed.

UQLab examples in HTML format online and offline. All the delivered UQLab examples are available online on the UQLab website under Documentation. You can also use the MATLAB builtin function publish to transform the examples source code into formatted HTML for offline reading.

  • /lib contains shared mathematical routines required by various UQLab modules.
  • /modules contains the open source scientific code of the various UQLab modules.

Proxy configuration

The UQLabCore licensing system requires a live internet connection at least once for every new MATLAB session for authentification with the license server. In some institutions, internet connection is locked behind a server proxy. If this is the case, please make sure that MATLAB is correctly configured to access the internet through a proxy server. See, e.g., The MathWorks instructions on this issue for detailed instructions on how to configure web access in MATLAB when behind a proxy server.

Still cannot install UQLab properly?

Don’t hesitate to use this forum to get help. Post your problem clearly and briefly in the Community Q&A and How To category. The community will assist you in the installation troubleshooting process.


Back to the FAQ index

Dear Damar,

I have registered to UQLab through my student account. However, I haven’t received the UQLabCore in my email. Should I do something about this?

Thank you for your time and attention.

1 Like

Dear UQLab community

After noticing errors in running the example scripts in UQLab, I deleted the folder (assuming that it was the way to uninstall uqlab) and reinnstalled it, following the procedure exposed in your post. When performing uqlab -selftest, some checks fail, as you notice in the image attached. What shall I do?

Thank you
Roberto Andreotti

uqlab_Error

Hi @RobertoUNITN,

Thank you for asking here. It seems to me that the installation is incomplete: some functions are missing. To solve the problem, I suggest re-installing again UQLab: you can delete completely the old folder and install it by following https://www.uqlab.com/install or you can create a new folder and install UQLab there.

Best regards,
Xujia

Dear Xujia

Thank you for the prompt reply. By deleting and reinstalling uqlab, this time all the checks are ‘OK’, thank you!

This is actually weird because it is precisely the same procedure I used yesterday, but didn’t work.

Anyways, now I have a problem with the plot. By running the first example in the Metamodelling_Kriging Library ('uq_Example_Kriging_01_1D.m’), I get the weird plots that you see in the image attached. How could I solve this plotting issue?

Thank you

Roberto

uqlab_Error2

Hi
i have a problem with installation UQLAB. i have matlab2021 and i do every thing you say but when i want install it i have error: Unrecognized function or variable ‘uqlab_install’.
Thank you for your time and attention.

Screenshot (38)

Hi @narges.asadpour,

Thanks for asking. Following the installation instruction, you need to enter into the “core” within Matlab (double click the folder “core” in the left panel “Current Folder”). Then, please type uqlab_install to install UQLab.

Best,
Xujia

Thanks. but i do it and i cant install it again. I received an email and downloaded file than unzip that but it doesn’t have core folder. i save web page about license in to the core. i think its my problem

The new version V2.0.0 of UQLab has been released since Feb 1st. Now, UQLab is open source, and there is no license requirement anymore. Therefore, you do not need a license, and please just sign up and visit https://www.uqlab.com/ to download the software (you can the “core” folder in the .zip file).

Dear Xujia

After the expiration of uqlab V1.4, I installed the open source version of UQlab V2.0. I strictly followed the steps mentioned above to uninstall the old version and install the new version. After installing the results, I ran the test using uq_selftest.m within the core folder, but I got some errors below. Looking forward to your answer. Thank you very much.

UQLab installation complete!

uq_selftest

Testing component: uq_lib… [OK]
Testing component: uq_default_dispatcher… [OK]
Testing component: uq_inversion… [OK]
Testing component: uq_rbdo… [OK]
Testing component: uq_reliability… [OK]
Testing component: uq_sensitivity… [FAILED]
Testing component: uq_default_input… [FAILED]
Testing component: uq_randomfield… [OK]
Testing component: uq_default_model… [OK]
Testing component: uq_metamodel… [OK]
Testing component: uq_uqlink… [OK]

— UQLab selftest results —

  • uq_selftest_uq_uqlib [OK]

  • uq_selftest_uq_default_dispatcher [OK]

  • uq_selftest_uq_inversion [OK]

  • uq_selftest_uq_rbdo [OK]

  • uq_selftest_uq_reliability [OK]

  • uq_selftest_uq_sensitivity [FAILED]
    *** 未定义与 ‘double’ 类型的输入参数相对应的函数 ‘empirical_cdf’。 ***

  • uq_selftest_uq_default_input [FAILED]
    *** 计算输入 ‘X’ 的 CDF 时出错。 ***

  • uq_selftest_uq_randomfield [OK]

  • uq_selftest_uq_default_model [OK]

  • uq_selftest_uq_metamodel [OK]

  • uq_selftest_uq_uqlink [OK]

Best Regards

Yiqi

Hi @hfcowt,

Thanks for asking here. Could you please run the two failed functions, i.e., uq_selftest_uq_sensitivity and uq_selftest_uq_default_input separately? Each of the function contains a few tests (you can enter into these functions to find more details in the list “TestNames”, each component of which is a test function). Could you please launch individually the subtests that fail and report the associated error so that I can further support you?

Best,
Xujia

Dear Xujia,

Thanks for you quickly reply. I test the two functions just now, and maybe find the reasons for these questions.

The reason is that the other toolbox within the MATLAB path disturbs the uqlab test task. After i deleted these path, the uq_selftest.m works well.

Best regards,

Hi @hfcowt,

Thanks for the feedback. I’m glad to know that the problem has been solved. Have fun with UQLab!

Best,
Xujia