Home > Software engineering >  Seek to obtain the numerical change trend of vb code (pictured), thank you
Seek to obtain the numerical change trend of vb code (pictured), thank you

Time:11-15

To get access a certain column numerical change trend point ID vb code

CodePudding user response:

With first order difference check,
Said bluntly, is subtracting the two points, before and after the formation of a new series, the series in the absolute value is greater than a certain threshold is the point of change,
For example
Raw data:
20,19,22,28,29,21,18,12,11,10,19,20
After the first order difference (the first I elements and I - 1 element subtraction to the first element and their subtraction)
0, 1,3,6,1, 8, 3, 6, 1, 1,9,1
Take the absolute value
0,1,3,6,1,8,3,6,1,1,9,1
Set a threshold value, such as 5
The ID of the first difference absolute value greater than 5 points is four,6,8,11

CodePudding user response:

Suppose your table called t
There are two column id and value
Select id, value the from t t1 where abs (t1) value - (select the value from t t2 where t1. Id=t2. Id + 1)) & gt; A value

CodePudding user response:

reference 1/f, crispy big ice cream reply:
with first-order difference check,
Said bluntly, is subtracting the two points, before and after the formation of a new series, the series in the absolute value is greater than a certain threshold is the point of change,
For example
Raw data:
20,19,22,28,29,21,18,12,11,10,19,20
After the first order difference (the first I elements and I - 1 element subtraction to the first element and their subtraction)
0, 1,3,6,1, 8, 3, 6, 1, 1,9,1
Take the absolute value
0,1,3,6,1,8,3,6,1,1,9,1
Set a threshold value, such as 5
The ID of the first difference absolute value greater than 5 points is 4,6,8,11

I feel confused to point to trend changes

CodePudding user response:

refer to the second floor caozhy response:
suppose your table called t
There are two column id and value
Select id, value the from t t1 where abs (t1) value - (select the value from t t2 where t1. Id=t2. Id + 1)) & gt; A value

Data su (xid, ydata)
Xid from 1 to 10000, corresponding to how to get a point mutation, the original code thank you

CodePudding user response:

reference 4 floor huangmeibo response:
Quote: refer to the second floor caozhy response:
suppose your table called t
There are two column id and value
Select id, value the from t t1 where abs (t1) value - (select the value from t t2 where t1. Id=t2. Id + 1)) & gt; A value

Data su (xid, ydata)
Xid from 1 to 10000, corresponding to how to get a point mutation, the original code thank you


You first look at your data characteristics, mutations are two adjacent point suddenly has changed a lot? Few points or through the transition form a larger change, variation between each point may be not big, but these points accumulation of changes in the middle of the 10000 point seems to be more big change?
  • Related