Plotting Gamma Distribution, please help?
7 次查看(过去 30 天)
显示 更早的评论
These are my code, however, i am not getting the plot.
X=1:100; % Duration of data
Data=rand(1,100); % randomly generated 100 years of data
Z=gamfit(Data); % fitting distribution for shape and scale factor
beta=2; % Shape factor
alpha=3; % scale factor
pdf=gampdf(X,alpha,beta); % pdf of the gamma distribution
Plot(pdf,X,'-');
0 个评论
回答(5 个)
Youssef Khmou
2014-9-22
It is correct, you just need to exchange pdf with X :
plot(x,pdf);
2 个评论
Youssef Khmou
2014-9-22
the variables alpha and beta are in the system , change theirs names to Alpha, Beta for example.
Benabed Rabia
2018-1-2
编辑:Benabed Rabia
2018-1-2
When i use plot command the graph just links the dots it does not give a curve, please help me! Thanks in advence
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!