问题:y=对数正太分​布密度+正太分布密度​的非线性回归分析。

有下列方程:
现在想用回归分析的方法求出系数a1--a6。方程的前半部分用函数 nlinfit已经完成,但是加上后半部门后提示函数错误。请高手解答。谢谢。

 采纳的回答

mesac
mesac 2022-11-21

0 个投票

因为 x 是一个向量,你的函数定义需要支持向量化运算。试试
modelfun =@(b,x) b(3)/sqrt(2*pi)/b(1)*exp(-(x-b(2)).^2/2/b(1)/b(1))+b(6)*x.^-1/sqrt(2*pi)/b(4).*exp(-(log(x)-b(5)).^2/2/b(4)/b(4));%正太分布+对数正太分布

更多回答(0 个)

类别

标签

Community Treasure Hunt

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

Start Hunting!