How to fit/scale a big data set into a smaller one?

3 views (last 30 days)
Paul
Paul on 23 Jun 2019
Commented: dpb on 23 Jun 2019
Hi,
my problem is pretty similiar to this one:
except that I dont have a repeating signal.
My problems is rather looking like this one:
2Datasets.png
DataSet 1 is the blue plot, defined by 65 X and Y values. DataSet 2 is the yellow one, defined by 3 values. Now my goal is to move, turn, scale etc. the blue data points in a way, so they fit the yellow points in the best possible way. Only limitations are a intersection with zero and the ratio between the blue data must stay equal. I tried several approaches with least square error or lsqcurvefit but the problem is always the difference in the number of values between the 2 data sets. A 9th degree polynomial fit of the blue data comes pretty close to what it looks like.
I also thought of the optimization toolbox, but I am failing to use it in the right way.
Cheers!
Paul
  1 Comment
dpb
dpb on 23 Jun 2019
No idea what you intend as a result. What does the phrase "limitations are a intersection with zero and the ratio between the blue data must stay equal" possibly mean?
Only thing I can suggest would be to draw onto the graph another set of points that represent what you think the ideal answer would look like...maybe that could let somebody visualize the request.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by