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

조회 수: 2 (최근 30일)
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
Brian
Brian 2022년 11월 22일
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 2022년 11월 25일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Arthur Goldsipe
Arthur Goldsipe 2022년 11월 28일
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.

카테고리

Help CenterFile Exchange에서 Import Data에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by