Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

I implement bootci function in for loop and I get the error " not enough input argument"

1 vue (au cours des 30 derniers jours)
Ashkan Rigi
Ashkan Rigi le 30 Oct 2021
Clôturé : John D'Errico le 30 Oct 2021
Here is my code:
t=0:.1:pi;
y=sin(t);
a=[1 2 3 4];
b=[4 5 6 7];
c=[8 9 10 11];
d=[12 13 14 15]
for i=1:length(a)
beta0(i,:)=[a(i) b(i) c(i) d(i)];
x=t';
s_i{i}=@(x) a(i)*(x-t(i)).^3+b(i)*(x-t(i)).^2+c(i)*(x-t(i))+d(i);
modelfunc(i)=s_i{i};
beta(i) = @(predictor,response)nlinfit(predictor,response,modelfunc(i),beta0(i,:))
c(:,k) = bootci(1000,{beta(i),t',y},'Type','norm');
k=k+2;
end

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by