Effacer les filtres
Effacer les filtres

find an equation for the set of coordinates

4 vues (au cours des 30 derniers jours)
Duncan
Duncan le 12 Août 2014
Commenté : Image Analyst le 17 Août 2014
I have the above plot with a different set of coordinates for each object(labeled by different colors). I was wondering if there was a way to find an approximate equation for each object in matlab.
I was thinking about smoothing out the "rougher" parts to make it easier but I'm not sure how to go about doing that. any ideas?
thanks

Réponses (2)

Image Analyst
Image Analyst le 12 Août 2014
How about just taking the average of the coordinates
windowWidth = 5;
newx = conv(x, ones(1, windowWidth)/windowWidth, 'same');
newy = conv(y, ones(1, windowWidth)/windowWidth, 'same');
  4 commentaires
Duncan
Duncan le 17 Août 2014
hi sorry, i noticed you put conv() in the e.g. and then said that conv2() is a polyfit of order 1.
Image Analyst
Image Analyst le 17 Août 2014
Sorry - I usually use conv2(), which is for 2D arrays (images). For a 1-D signal, you'd use conv().

Connectez-vous pour commenter.


Ahmet Cecen
Ahmet Cecen le 12 Août 2014
I would use cftool, easier to play around with different fits, and not confined to polynomials.

Catégories

En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by