- #1
member 428835
Hi PF!
Suppose I have three pieces of data: x1 = 0:3:12 and x2 = 0:4:16 and x3 = 0:5:20 with corresponding functions y1 = x1.^2 and y2 = x2.^3 and y3 = x2.^4. How would you average these the "functions" with data (x1,y1) and (x2,y2) and (x3,y3)? My thoughts are:
1) linearly interpolate y1, y2, y3 over a new domain, xnew1 = 0:1:12
2) average y1, y2, y3 interpolations over xnew1
3) linearly interpolate y2 and y3 over xnew2 = 12:1:16
4) average y2,y3 interpolations over xnew2
5) let xnew3 = 16:20
6) average y3 interpolated value over xnew3 (which is just letting y3 take it's values here since no other functions are defined here).
The above is my blueprint, but before I begin, is there an easier way?
Suppose I have three pieces of data: x1 = 0:3:12 and x2 = 0:4:16 and x3 = 0:5:20 with corresponding functions y1 = x1.^2 and y2 = x2.^3 and y3 = x2.^4. How would you average these the "functions" with data (x1,y1) and (x2,y2) and (x3,y3)? My thoughts are:
1) linearly interpolate y1, y2, y3 over a new domain, xnew1 = 0:1:12
2) average y1, y2, y3 interpolations over xnew1
3) linearly interpolate y2 and y3 over xnew2 = 12:1:16
4) average y2,y3 interpolations over xnew2
5) let xnew3 = 16:20
6) average y3 interpolated value over xnew3 (which is just letting y3 take it's values here since no other functions are defined here).
The above is my blueprint, but before I begin, is there an easier way?