フィルターのクリア

Requires a vector second input argument.

4 ビュー (過去 30 日間)
Ashkan Rigi
Ashkan Rigi 2021 年 10 月 29 日
コメント済み: Matt J 2021 年 10 月 29 日
hi. I run the code below and got the error " Requires a vector second input argument."
t=0:.1:pi;
y=sin(t);
modelfun = @(b,x)(b(1).*x.^3+b(2).*x.^2+b(3).*x+b(4));
b = [-.161;1;1;1];
y = modelfun(b,x) + normrnd(0,0.1,32,1);
beta0 = [2;2;2];
beta = @(predictor,response)nlinfit(predictor,response,modelfun,beta0)
ci = bootci(1000,beta,t,y)
  1 件のコメント
Matt J
Matt J 2021 年 10 月 29 日
That's not the error that I get:
t=0:.1:pi;
y=sin(t);
modelfun = @(b,x)(b(1).*x.^3+b(2).*x.^2+b(3).*x+b(4));
b = [-.161;1;1;1];
y = modelfun(b,x) + normrnd(0,0.1,32,1);
Unrecognized function or variable 'x'.
beta0 = [2;2;2];
beta = @(predictor,response)nlinfit(predictor,response,modelfun,beta0)
ci = bootci(1000,beta,t,y)

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

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by