How can i do curve fitting in complex field?
2 次查看(过去 30 天)
显示 更早的评论
Now, I trying to make a curve fitting in complex number but, It doesn't work.
below picture is my equation. (x1~x8 is variable(variable is real value, not complex), w is frequency matrix, eq is response)
I want to fit to response result. pls, Give me a solution.
0 个评论
采纳的回答
Star Strider
2020-8-21
编辑:Star Strider
2020-8-21
If the ‘x’ parameters are real and ‘w’ is real, and ‘eq’ is complex, one option would be to create your data as separate vectors of the real part and the complex part, then fit the real and complex parts of your model to the real and complex parts of your data.
It would go something like this (assuming column vectors):
Data = [real(eq(:)) imag(eq(:))];
and the model would then be:
eq_mdl = @(x,w) [real(model(x,w)) imag(model(x,w))];
2 个评论
Star Strider
2020-8-23
I do not understand what you are asking. The code I suggest will evaluate the model for all values of ‘x’ and all values of ‘w’ and create a matrix to compare with the ‘Data’ matrix. The optimisation function you choose will then adjust all the ‘x’ parameters to create the closest fit with the model and the data.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Least Squares 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!