フィルターのクリア

How can I store fitdist output as a variable in a matrix please?

2 ビュー (過去 30 日間)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2018 年 10 月 1 日
コメント済み: MAHMOUD ALZIOUD 2018 年 10 月 1 日
Dear All, I run the command fitdist to produce the distribution parameters, since I do the run 200 times it is hard to write the parameters by hand, how can I please store them in a matrix as variables? the attached image show the output.

採用された回答

ANKUR KUMAR
ANKUR KUMAR 2018 年 10 月 1 日
編集済み: ANKUR KUMAR 2018 年 10 月 1 日
Since you have not provided the data, I am taking random data to run loops.
clc
clear
for i=1:200
pd = fitdist(randi(20,1,100)','Normal');
mu(i)=pd.mu; %you can give any variable in place of mu(i)
sigma(i)=pd.sigma; %you can give any variable in place of sigma(i)
end
  2 件のコメント
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2018 年 10 月 1 日
my data are named as follows (data1, data2 .... data200), and i sue the following code to produce the parameters:
pd1 = fitdist(data1, 'Normal');
pd2 = fitdist(data2, 'Normal');
.
.
.
pd3 = fitdist(data3, 'Normal');
how can I use the syntax you just gave me to include this code please?
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2018 年 10 月 1 日
i did it, thank you very much

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by