필터 지우기
필터 지우기

Weibull Fit for Dataset in Excel

조회 수: 4 (최근 30일)
Nitya Sathish
Nitya Sathish 2020년 11월 30일
댓글: Nitya Sathish 2020년 12월 4일
trnSet = datastore("trainingSet.csv");
trnSet.ReadSize = 'file';
trnSet.TreatAsMissing = 'na';
trnSetR = read(trnSet);
coloumn = trnSetR.Properties.VariableNames;
trnSetR = table2array(trnSetR);
vec=zeros(1,height(trnSetR));
for k=1:height(trnSetR)
vec(1,k)=trnSetR(k);
end
[parmHat,parmCI] = wblfit(vec)
disp(parmHat);
How do I do a Weibull analysis of a data colomun with 60000 data sets?
Above is what I have so far, but it is giving me an error at vec=zeros(1,height(trnSetR));
  댓글 수: 3
Vimal Rathod
Vimal Rathod 2020년 12월 3일
Could you specify what error did you get exactly? I think height function will work on arrays as well.
Nitya Sathish
Nitya Sathish 2020년 12월 3일
it says check for missing argument or incorrect argument data type in call to function 'height'.

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

답변 (1개)

Vimal Rathod
Vimal Rathod 2020년 12월 4일
Hi,
From 2020b MATLAB supports height function for arrays as well, but it seems like you are using a previous version so its better to use another alternative to height function for array that is size function.
vec=zeros(1,size(trnSetR,1));
Using this line will help you run your script.
Refer to the following link to know more about size function
  댓글 수: 1
Nitya Sathish
Nitya Sathish 2020년 12월 4일
Now it says
X must be a vector containing positive values.
Error in (line 11)
[parmHat,parmCI] = wblfit(vec);

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

Community Treasure Hunt

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

Start Hunting!

Translated by