Create a polar function from a polar regression
显示 更早的评论
I have a set of data points in polar coordinates. I would like a polar function from them. How could I go about that? Thank you.
回答(1 个)
John D'Errico
2018-10-12
0 个投票
Your question is slightly ambiguous. Are you looking to find a model of the form z=f(r,theta)? Or do you want some model that lies entirely in the polar plane, perhaps r=f(theta)? The two problems are of course very different.
In the former case, you really do NOT want to build a model in polar coordinates. Instead, convert your data to cartesian coordinates. Then build a model of the form z(x,y). To evaluate the model as a function of polar input, that is trivial. Just evaluate it as z(r*cos(theta),r*sin(theta)). To try to build a model that works directly in the form z(r,theta), you will suffer from the built in discontinuity that lies at the 0/2*pi boundary. As such you would then need to build a model that is continuous across that boundary, which is a needless complexity.
In the second case, where you might wish to build a model of the form r=f(theta), to model data that lies entirely in the polar plane, then the pertinent question is what model you would think appropriate.
In any case, there is no magical way to build a model for ANY completely arbitrary set of data. What matters are questions like is there noise present in the process, noise that must be smoothed out? Or is this a purely interpolatory problem? Does your process follow a relationship that is single valued? Do you have some sort of model in mind?
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!