Relating random values from one data set with corresponding values in another data set

x=[5 3 10 11 1 12 2 2 15 3]; Y=[10 2 1 15 20 2 25 1 30 1]; Suppose X variable represents daily Temperature. Suppose Y variable represents something depends on daily Temperature. Y may or may not directly relates to temperature of the corresponding day. Temperature today might relates with the Y on today, tomorrow, or the day after. So I want a code to group the cases where X relates best with Y out of those three cases.
For an example, x(3) which is 10 relates well to y(4) which is 15, so how to write a code for the entire data set (not just for above two values).

1 件のコメント

KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 9 月 20 日
x(3) which is 10 relates well to y(4)
How do you know that?

回答 (1 件)

0 投票

10 and 11 are sudden increases of X. Those are indices of 3 and 4 of x. In y, then I have to find whether there are sudden increase in indices 3,4, or 5 (with in about 3 indices). So indices 4 and 5 of y also have sudden increases. That's how we see those are related.

この質問は閉じられています。

タグ

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by