Extracting Histogram data for plot generation
조회 수: 10 (최근 30일)
이전 댓글 표시
Hi,
I generated a sample of lognormal distribution using Simbiology analyzer. I want to extract the data of the samples' histogram to plot the exact histogram using graphPad prism. Could you please tell me how to extract the data of the histogram plot to generate he same graph in prism?
Thanks
댓글 수: 2
Image Analyst
2024년 4월 8일
What is "graphPad prism"? Is that a third party plug-in for MATLAB, a product of Mathworks, or some separate program?
답변 (2개)
KSSV
2024년 4월 8일
h = histogram(rand(100,1))
data = h.Data ;
BinEdges = h.BinEdges ;
Values = h.Values ;
Fulden Buyukozturk
2024년 4월 8일
편집: Fulden Buyukozturk
2024년 4월 8일
You can export the samples you generated using Model Analyzer to an Excel file:
- Find the samples under your program results
- Drag and drop "samples" to a Datasheet
- Right click on the Dataseet and select "Export Datasheet"
Please see the screenshot below:
댓글 수: 5
Fulden Buyukozturk
2024년 4월 9일
편집: Fulden Buyukozturk
2024년 4월 9일
Since this is a histogram, vertical axis represents the number elements in the bin. You can get information such as bin width, number of bins, bin edges, etc. by checking histogram's properties.
For a histogram created in Model Analyzer, first right click on the histogram and select export plot. This will export as a MATLAB figure. You can then get a handle of the histogram by typing the following in MATLAB Command Window:
fig = gcf;
hist = findobj(fig, 'Type', 'Histogram');
Once you get a handle to histogram, get some of its properties as KSSV showed above:
% get bin width
binWidth = hist.BinWidth
% get bin edges
binEdges = hist.BinEdges
% get number of bins
binEdges = hist.NumBins
Fulden
커뮤니티
더 많은 답변 보기: SimBiology Community
참고 항목
카테고리
Help Center 및 File Exchange에서 Scan Parameter Ranges에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!