How to extract value of Sobol index from the Sobol index plot generated in Matlab ?

4 views (last 30 days)
Find the attached figure that is saved in Matlab. I need to extract the value of first order and total order sobol index.
I have used the following way to extract the data
h = findobj(gca,'Type','line')
x=get(h,'Xdata') ;
y=get(h,'Ydata') ;
but it gives me this:
h =
2×1 Line array:
Line
Line
Please let me know, as i need to know the highest value of k8,k_8 and so on for both first and total order Sobol index.
  2 Comments
Brian
Brian on 22 Nov 2022
If you are plotting using a SimBiology.gsa.Sobol object, you can access the indices through the "SobolIndices" struct array, e.g.:
sobolObj.SobolIndices(1)
sobolObj.SobolIndices(2)
etc.
If this doesn't help, could you provide a more detailed description of your workflow or provide some more sample code?
Darshna Joshi
Darshna Joshi on 25 Nov 2022
Unable to resolve the name 'sobolObj.SobolIndices'. I am getting this error. Am i missing something? I have used the global sensitivity analysis tool to generate the indices.

Sign in to comment.

Answers (1)

Arthur Goldsipe
Arthur Goldsipe on 28 Nov 2022
In your comment, what do you mean by the "global sensitivity analysis tool"?
Do you mean you are running a global sensitivity analysis (GSA) program using the SimBiology Model Analyzer app? If so, then you can view the Sobol Indices in a datasheet in the app itself. You can also export this information in several different ways. I'll provie more details below.
After you run the GSA program, you will by default get a datasheet that includes the sobol indicies. You can also create a new one by clicking on "New Datasheet" in the toolstrip, and then dragging the "results" variable from the program into this datasheet.
You can create a spreadsheet that contains the information in the Datasheet by right-clicking on a table and selecting "Export Datasheet."
You can also export the Sobol results to the MATLAB workspace by right-clicking on the "results" variable for the program and selecting "Export Data to MATLAB Workspace...". By default, this will create a variable name "results", and then you can access the SobolIndicies property on this variable that Brian mentioned in a comment as results.SobolIndices.

Categories

Find more on Scan Parameter Ranges in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!