How to average out the drifting circle?

I have X and Y coordinates of a drfting trajectory (oval). The are about 2.5 passages of the drfting trajectory (oval). I would like to obtain an averaged orbit of the trajectory.
The picture below shows the trajectory. The data coordinates are blue. I want a circle like Red one.
The data for X and Y is attached below.
Here is the code for blue circles:
load('matlab.mat')
subplot(211);
plot(Rgsm(1,:),Rgsm(2,:));
Any help is greatly appriciated. Thank you in advance!

 Accepted Answer

KSSV
KSSV on 15 Jun 2022

5 Comments

You need to read the coomments given in the function. Check the example shown in there.
Thank you for your valuable suggestions
load('matlab.mat')
x = Rgsm(1,:) ;
y = Rgsm(2,:) ;
plot(x,y,'.b')
hold on
ellipse_t = fit_ellipse(x,y,gcf) ;
MP
MP on 15 Jun 2022
Edited: MP on 15 Jun 2022
Yes, That worked. Thank you so much @KSSV
Perfect...
Enjoy MATLAB..!

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics in Help Center and File Exchange

Asked:

MP
on 15 Jun 2022

Commented:

on 15 Jun 2022

Community Treasure Hunt

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

Start Hunting!