| 查看: 670 | 回复: 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 (.*, ./, .^). 请教各位长老是什么问题?谢谢。 |
» 猜你喜欢
如何从铁电相到顺电相。
已经有1人回复
各位大佬,求一份最新Wien2k版本作为学习用途
已经有0人回复
物理学I论文润色/翻译怎么收费?
已经有284人回复
南科大活性流体和软物质课题组诚招2027级博士、硕士研究生和博后
已经有42人回复
瑞典林雪平大学博士后招聘|PEC Water Splitting 方向
已经有24人回复
PRB投稿,Acknowledgment sent to author状态十天了
已经有3人回复
PVA溶解
已经有1人回复
基金申请
已经有44人回复
CSC与新西兰维多利亚大学PhD奖学金项目
已经有0人回复
新西兰Robinson研究所 招聘CSC公派访问人员
已经有0人回复
帮我的英语口语老师找学生
已经有0人回复










回复此楼