前提是我有 5*5 的 dataArray
d= [0.0177104427823448,0.00246661459209512,0.0399831543374395,0.0615494164555707,0.0476204124707652;0.0275276152854314,0.0219153841813084,0.0581144391404502,0.144890028400954,0.157839631316098;0.0622883972729130,0.0716157303159909,0.245482781674067,0.123999612575059,0.177495187746408;0.0200735764542146,0.0573087934038160,0.0636451189717613,0.0160810084568415,0.0484992279558924;0.0185180386159227,0.00841167700273800,0.0372017422726281,0.0173721095082637,0.0459520362441099]
而且我想使用数据来拟合特定的二维函数和最小二乘拟合技术。函数是这样的:
r = alfa*sin(pi*(n1+delta1))*sin(pi*(n2+delta2)) / (25*sin(pi/5*(n1+delta1))*sin(pi/5*(n2+delta2))),
其中 alfa,delta1,delta2 是需要估计的参数,n1,n2 取值范围为 1 到 5。
函数拟合结果如下:
我不知道如何在 MATLAB 中做这些事情。谁能帮我?