# Best way to count outputs for a 2D polynomial function along the curve of an implicit equation

2 views (last 30 days)

Show older comments

##### 0 Comments

### Answers (1)

John D'Errico
on 8 Sep 2023

Edited: John D'Errico
on 8 Sep 2023

Um, good luck at doing it at all well. Even anything in the right ball park would be a success. But you won't know how well you did either.

A big problem is that while yes, you have a contour line. But that contour will be defined by a set of points along a broken curve. And worse, it will have been generated using linear interpolation, and be piecewise linear between those points in (x,y). So what you call a contour line is actually only an approximation to the true contour line. I won't even ask where the contour line came from, or how far you can trust that.

This means, at best, you only know roughly where that contour line actually lies. Regardless, then you have a nasty polynomial function, of high degree, with MANY terms. Tiny perturbations in the contour line will introduce large deviations in the value of that function P(x,y). Do you see where I'm going?

And, of course, how did you generate that multinomial P(x,y)? Odds are, you used regression techniques, itself fraght with problems for high degree polynomials.

Hey, good luck.

Just generate a zillion points along the contour, then evaluate the polynomial P(x,y) at each point. But, as I said, I would not trust the result in the slightest.

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!