未定义与 'inline' 类型的输入参数相对应的函数 'nlinfit'。

조회 수: 1 (최근 30일)
savcwdc
savcwdc 2023년 5월 21일
답변: btxqhrd 2023년 5월 21일
求高手看下怎么改
x = [2,3,4,5,7,8,10,11,14,15,15,18,19];
y = [106.42,109.20,109.58,109.50,110.00,109.93,110.49,110.59,110.60,110.90,110.76,111.00,111.20];
myfunc = inline('beta(1)+beta(2).*log(x)','beta','x');
beta0 = [0.2,0.2];
beta = nlinfit(x,y,myfunc,beta0);

채택된 답변

btxqhrd
btxqhrd 2023년 5월 21일
估计是你的版本的问题。20a版能正常运行,算出来
beta = 106.711310208455 1.56634344771415

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 函数基础知识에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!