| 查看: 694 | 回复: 0 | ||
njfu3110246木虫 (小有名气)
|
[求助]
Matlab非线性回归问题
|
|
各位虫友,麦菜一枚,请教二元非线性回归问题。 方程程序如下: function y = fu(beta,x) %UNTITLED3 Summary of this function goes here % Detailed explanation goes here a=beta(1); b=beta(2); c=beta(3); y=a*x(:,1)^b*x(:,2)^c; end 数据如下: x1=[6 6 8 8 8 8 8 8 10 10 12 12]; x2=[20 20 20 20 15 15 10 10 15 15 10 10]; x=[x1 x2]; y=[254.4 228 233.1 258.6 189.8 230.5 218.7 215.7 247.4 219.9 218.1 233.1]; beta=[1 1 1]; [beta,r,j]=nlinfit(x,y,@fu,beta); 结果一直出错: One common reason for a size mismatch is using matrix operators (*, /, ^) in your function instead of the corresponding elementwise operators (.*, ./, .^). 请教各位长老是什么问题?谢谢。 |
» 猜你喜欢
求助中医院临床中医中标的青年标书学习,谢谢
已经有6人回复
浙大物院表面物理课题组长期招收普博及直博学生
已经有259人回复
物理学I论文润色/翻译怎么收费?
已经有196人回复
【征稿】Springer Nature热电专题 Discover Materials / Discover Chemistry
已经有47人回复
25届硕士申请,材料计算方向
已经有2人回复
课题组招1-2名硕士
已经有1人回复
机时越来越贵之后,我把一部分 DFT 流程搬到了 AI 计算平台上
已经有0人回复
斯坦福大学与Elsevier世界前2%学者新排名查询
已经有1人回复
27申博推荐:南京航空航天大学国际前沿院光学方向招收博士生!
已经有19人回复
华南师范大学+双一流学科物理学+广东省杰青团队2027年博士招生+机器学习驱动材料设计
已经有1人回复
apl投稿状态
已经有1人回复










回复此楼