Circle least squares fit for 3D data
Show older comments
Hi everyone,
I have 6000 x coordinates, y coordinates and z cooridinates that form a circle that does not perfectly occupy one plane. I am looking to fit the data with a circle but I can only find functions online that do it for x and y coordinates and not including z. I would appreciate any help in creating some code for this as I am not sure where to start (I am a beginner in MATLAB!)
Thank you in advance
Ciara
8 Comments
Bruno Luong
on 7 Aug 2019
Start to find the plane that approximate your 3D points then project point on this plane then use your prefered 2D circle fitting method.
KSSV
on 7 Aug 2019
If you have z also , it should be a sphere right?
Ciara Gibbs
on 7 Aug 2019
Ciara Gibbs
on 7 Aug 2019
@Bruno Luong, thank you for replying firstly! Please could you help me in terms of finding a plane, I am not sure how to go about this (sorry I am only beginners level :) ). Any help would be much appreciated!
https://stackoverflow.com/questions/48200261/fit-plane-to-n-dimensional-points-in-matlab
Bruno Luong
on 7 Aug 2019
Edited: Bruno Luong
on 7 Aug 2019
Can you attach your data. From the picture it is not clear any circle shape would emerge from this perspertive.
Ciara Gibbs
on 7 Aug 2019
Ciara Gibbs
on 7 Aug 2019
Accepted Answer
More Answers (0)
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
