필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Grouping values for max and min in irregular data sets

조회 수: 1 (최근 30일)
Thishan Dharshana Karandana Gamalathge
마감: MATLAB Answer Bot 2021년 8월 20일
I have two large data sets. The second data set depends most of the time on the first data sets. But the problem is, dependancy might not be immediate. For an example, in some cases it might be after two cases, in some other, it might be after three cases. There might be cases right on top of it as well. This grouping cannot be done manually as the data set is large. So need to have a code. Consider the following data sets as an example.
x=[5 3 10 11 1 12 2 2 15 3]; Y=[10 2 1 15 20 2 25 1 30 1];
Consider a case where x(1) to y(1), x(3) to y(4), x(4) to y(5), x(9) to y(9).One way I am thinking of is, compare X(i) with Y(i:i+3) and select the Y corresponding to X. It is better if the program it self decide what is the value for selecting lower values and upper values, but for this example consider it to be 10 for Y.
Thanks, Thishan
  댓글 수: 1
Steven Lord
Steven Lord 2018년 9월 17일
It's not clear to me what you're trying to do or what you're looking to implement. What does "x(3) to y(4)" mean? Why are x(3) and y(4) related somehow and not x(3) and y(1)?
Please start your explanation at the beginning, don't assume we have any background knowledge of your application.

답변 (1개)

Thishan Dharshana Karandana Gamalathge
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 to group the cases where X relates best with Y out of those three cases.
In the given example what i meant by x(3) to y(4) is X(3) which is 10 relates well to Y(4) which is 15.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by