extrapolation from correlated data
显示 更早的评论
Hi,
I've got a bit of a problem.
I've got 2 data sets, which are very highly correlated with one another. Knowing the future values of one set of data, I would like to extrapolate the other set. How would I go about doing this
采纳的回答
更多回答(1 个)
Image Analyst
2019-12-3
Can you attach some data?
If the values are correlated, how about if you scatter one versus the other, then fit a line between them? Now if you have the future values of set #1, y1, then you must have the future times, tFuture. So what if you just extrapolate them? You can add some noise if you want.
coefficients = polyfit(y1, y2, 1); % Fit a line through the scatterplot ov y2 vs. y1.
y1Future = y1(tFuture); % Get the y1 values at the future times.
y2Future = polyval(coefficients, y1Future); % Predict the y2 values when y1 are these values.
plot(tFuture, y2Future, 'ms-'); % Plot the y2Future values vs. time.
That's just off the top of my head. Can you attach some data so we can see if it seems reasonable?
类别
在 帮助中心 和 File Exchange 中查找有关 Correlation and Convolution 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

