Not able to plot probability density distribution.

2 Ansichten (letzte 30 Tage)
Anshuman
Anshuman am 29 Okt. 2022
Kommentiert: Torsten am 30 Okt. 2022
I am trying to plot a probability density fucntion of growth factors of a matrix with respect to LU decomposition ; the growth factor is defined as g_f in my code.
The final plot should look like this for 3 values of m (size of matrix), I tried it for m = 8. But the plot does not appear! It only gives a nlank figure! Can someone suggest me what changes I shall do, thanks a lot for your advice and time!
x = 1:1000:1;
pd = makedist('Normal');
pd = makedist('Weibull','A',5,'B',2);
n = 1000;
gf = zeros(n);
for j = 1:n
A = (randi([0,1] , 8));
[L,U] = lu(A);
g_f(j) = max(U)/max(A);
end
pdf_normal = pdf(pd,g_f);
plot(x,pdf_normal,'LineWidth',2)
  20 Kommentare
Anshuman
Anshuman am 30 Okt. 2022
Yeah, I read the text, they are using it like this: 'A = rand(m(i),m(i))/sqrt(m(i));' Now my current plot after using this looks like the following! Can't understand why it's not matching it exactly! Nevertheless, thanks a lot for your help; I really could not have even came close to plotting this, without the help of you all!
Torsten
Torsten am 30 Okt. 2022
You also use logarithmic scale for the x-axis. This is not the case in the graphics of the publication.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by