Finding weighted sum of multiple curves
Show older comments
I have a dataset with values of multiple curves. An example plot is shown below.
I want to scale the curves (move up/down) so that all curves overlap.
The following is a sample dataset which includes that data points corresponding to 5 curves and coordinate inputs below
scale = 1.5;
x1 = [0,4,6,10,15,20]*scale;
y1 = [18,17.5,13,12,8,10];
x2 = [0,10.5,28]*scale;
y2= [18.2,10.6,10.3];
x3 = [0,4,6,10,15,20]*scale;
y3 = [18,13,15,12,11,9.6];
x4 = [9,17,28]*scale;
y4 = [5,5.5,7];
x5 = [1,10,20]*scale;
y5 = [3,0.8,2];
plot(x1,y1, '*-', x2, y2, '*-', x3, y3, '*-', x4, y4, '*-', x5, y5, '*-')

To scale the curves, I need to find the scale factor by defining a target curve.
I'm not sure of the ways in which the target curve can be defined. Would it be a good
approach to compute the weighted sum? Since the x scale is different for each curve, I am not sure
how to define an average/ target curve.
Suggestions will be really appreciated.
6 Comments
Adam Danz
on 5 Jul 2022
I think this is the real goal:
> I want to scale the curves (move up/down) so that all curves overlap.
but you're asking about,
> Finding weighted sum of multiple curves
If this is correct, please elaborate on the goal. What kind of transformations do you expect? For example, do you expect the curves to merely shift vertically with no other changes? Should the curves minimum be at y=0?
Deepa Maheshvare
on 6 Jul 2022
Edited: Deepa Maheshvare
on 6 Jul 2022
Adam Danz
on 6 Jul 2022
What defines the weights?
What are you summing?
Deepa Maheshvare
on 6 Jul 2022
Adam Danz
on 6 Jul 2022
I still don't have a mental image of what the results should look like. Could you illustrate that?
Deepa Maheshvare
on 7 Jul 2022
Accepted Answer
More Answers (0)
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

