how can I find the radius of part of spherical surface

5 ビュー (過去 30 日間)
israel gabay
israel gabay 2017 年 12 月 19 日
コメント済み: israel gabay 2017 年 12 月 20 日
I had an experiment that gave my part of spherical surface.
I didnt know where the (x,y,z) location of the surface and is radius? I want to find a way to determine the radius, and if there is some fit for spherical surface it will be the best option.

回答 (3 件)

Torsten
Torsten 2017 年 12 月 19 日
編集済み: Torsten 2017 年 12 月 19 日
Use fminsearch to determine radius and center of the sphere which approximates your point cloud best (4 unknowns).
To this end, you will need to project your points onto the surface of a sphere suggested by fminsearch, calculate the distances between your points and their projections and sum them up. This will give you the function to minimize.
Best wishes
Torsten.
  2 件のコメント
Torsten
Torsten 2017 年 12 月 19 日
Im not sure how to use fminsearch,
I have x y z there are my data (each of them are vector with n values) and the function I want to check is (x-x0)^2+(y-y0)^2+(z-z0)^2-R^2=0
but I dont understand how to use fmin for that
thanks a lot! Israel.
Torsten
Torsten 2017 年 12 月 19 日
During the optimization process, fminsearch gives you 4 parameters: x0, y0, z0 and R.
With these parameters you will have to calculate the distances d_i of all your points (x_i,y_i,z_i) (i=1,...,N) from the sphere (x-x0)^2+(y-y0)^2+(z-z0)^2 = R^2.
The return parameter to fminsearch is then sum_{i=1}^{N} d_i, and fminsearch will try to minimize this sum.
Best wishes
Torsten.

サインインしてコメントする。


israel gabay
israel gabay 2017 年 12 月 19 日
I still dont understand how to find with fmin the parameter (x0,y0,z0,R)
  1 件のコメント
Torsten
Torsten 2017 年 12 月 19 日
You don't need to find them, fminsearch will do.
You only have to provide a starting guess for x0,y0,z0 and R.
Best wishes
Torsten.

サインインしてコメントする。


israel gabay
israel gabay 2017 年 12 月 19 日
its good that fmin will find them but how I use this function I dont find the write syntax u can write please how I need to use this function exactly
Thanks again !
  3 件のコメント
Torsten
Torsten 2017 年 12 月 19 日
This might be of help if the use of fminsearch is too difficult:
https://de.mathworks.com/help/vision/ref/pcfitsphere.html
Best wishes
Torsten.
israel gabay
israel gabay 2017 年 12 月 20 日
Thanks!
I will try to use the 2 option.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by