RE to extract all individual lines not containing - re2

I'm somewhat new to re2 & regexextract, but I'm attempting to extract all lines containing:
FAILED
any attributes (attr#) that are not 0. (attr1, attr2, & attr3 are negligible)
attr8 > 250
Here's my data from cell B2:
/entry_a 0:0:0:0 brand1 SN:7384705 attr1:B2 attr2:[100] attr3:(6) FAILED attr4:0 attr5:0 attr8:255
/entry_b 2:0:0:0 brand2 SN:HS749435 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:33 attr5:0 attr7:0
/entry_c 3:0:0:0 brand2 SN:HS749475 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:0 attr5:0 attr7:0
/entry_d 4:0:0:0 brand2 SN:HS747430 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:16 attr5:0 attr6:212 attr7:212
/entry_e 5:0:0:0 brand2 SN:HS746435 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:14 attr5:0 attr6:1233 attr7:1233
/entry_f 6:0:0:0 brand2 SN:HS74C438 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:0 attr5:0 attr7:0
/entry_g 6:0:1:0 brand2 SN:HS774635 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:135 attr5:0 attr6:3 attr7:3
/entry_h 6:0:2:0 brand2 SN:HS749432 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:60 attr5:0 attr6:12 attr7:12
/entry_i 6:0:3:0 brand2 SN:HS747435 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:0 attr5:0 attr6:842 attr7:842
/entry_j 6:0:4:0 brand2 SN:HS749433 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:0 attr5:0 attr7:0
/entry_k 6:0:5:0 brand2 SN:HS7483F4 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:0 attr5:0 attr7:0
/entry_l 6:0:6:0 brand2 SN:H7D84735 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:1 attr5:0 attr6:190 attr7:190
/entry_m 6:0:7:0 brand2 SN:HS749436 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:0 attr5:0 attr6:11 attr7:11
Here's what I'm looking to get in cell C2:
/entry_a 0:0:0:0 brand1 SN:7384705 attr1:B2 attr2:[100] attr3:(6) FAILED attr4:0 attr5:0 attr8:255
/entry_b 2:0:0:0 brand2 SN:HS749435 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:33 attr5:0 attr7:0
/entry_d 4:0:0:0 brand2 SN:HS747430 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:16 attr5:0 attr6:212 attr7:212
/entry_e 5:0:0:0 brand2 SN:HS746435 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:14 attr5:0 attr6:1233 attr7:1233
/entry_g 6:0:1:0 brand2 SN:HS774635 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:135 attr5:0 attr6:3 attr7:3
/entry_h 6:0:2:0 brand2 SN:HS749432 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:60 attr5:0 attr6:12 attr7:12
/entry_i 6:0:3:0 brand2 SN:HS747435 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:0 attr5:0 attr6:842 attr7:842
/entry_l 6:0:6:0 brand2 SN:H7D84735 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:1 attr5:0 attr6:190 attr7:190
/entry_m 6:0:7:0 brand2 SN:HS749436 attr1:C3 attr2:[3000] attr3:(3) PASSED attr4:0 attr5:0 attr6:11 attr7:11
I've tried different variations of this:
=ArrayFormula(REGEXEXTRACT($B2:B,"(?ms).*"))
which gives me everything or an error, and have yet been able to get everything I need.
How do I get there??
++ bonus points if you can inform me how to get this in cell D2:
SN:7384705
SN:HS749435
SN:HS747430
SN:HS746435
SN:HS774635
SN:HS749432
SN:HS747435
SN:H7D84735
SN:HS749436
Thanks in advance!!

Related

pyspark map function not showing output

Here some simple code:
%python
allPaths=dbutils.fs.ls("/user/hive/warehouse")
allPathsFiltered = map(lambda x:(x[0]),allPaths)
matching = [s for s in allPathsFiltered if "tabx" in s]
print(list(allPaths))
print(list(allPathsFiltered))
print(list(matching))
returns:
[FileInfo(path='dbfs:/user/hive/warehouse/aaa/', name='aaa/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/bbb/', name='bbb/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/example_03/', name='example_03/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/sox/', name='sox/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/sox2/', name='sox2/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/sox3/', name='sox3/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/src/', name='src/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/src2/', name='src2/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/tabx/', name='tabx/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/taby/', name='taby/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/vrba/', name='vrba/', size=0), FileInfo(path='dbfs:/user/hive/warehouse/zzz/', name='zzz/', size=0)]
[]
['dbfs:/user/hive/warehouse/tabx/']
Why does the 2nd print not show any data?
allPathsFiltered is an iterator, and you have already iterated through it when defining matching, so if you try to iterate through it again using list(allPathsFiltered) it won't return anything.
You can try
allPaths = dbutils.fs.ls("/user/hive/warehouse")
allPathsFiltered = list(map(lambda x:(x[0]),allPaths))
matching = [s for s in allPathsFiltered if "tabx" in s]
Personally I prefer list comprehensions though, like
allPathsFiltered = [x[0] for x in allPaths]

How do I parse datetime in KDB Q?

I have minutely data:
t o h l c v
------------------------------------------------------
2016-01-04T09:00:00Z 105.45 105.45 103.6 103.6 17462
2016-01-04T09:03:00Z 103.7 103.99 103.7 103.99 893
2016-01-04T09:06:00Z 103.7 103.7 103.7 103.7 335
Which I've read in with:
f: `:/home/chris/sync/us_equities/AAPL.csv
show flip `t`o`h`l`c`v!("SFFFFI";",")0: f
I'm trying to work out how to parse the ISO8601 timestamp into something KDB understands. How should I do it?
This is my first time using q.
You can drop the last character (-1_) from each value on the right (/:) and then parse ($) to timestamp
f: `:/home/chris/sync/us_equities/AAPL.csv
tab:flip `t`o`h`l`c`v!("*FFFFI";",")0: f
update "P"$-1_/:t from tab
Note that * should be used for generic text data rather than S
https://code.kx.com/q/ref/tok/#unix-timestamps
https://code.kx.com/q/ref/maps/#each-left-and-each-right
https://code.kx.com/q/ref/drop/
https://code.kx.com/q/basics/datatypes/#strings
If you're using kdb v4.0 or greater you can parse it directly as type "P":
q)("PFFFFI";1#",")0:f
t o h l c v
--------------------------------------------------------------
2016.01.04D09:00:00.000000000 105.45 105.45 103.6 103.6 17462
2016.01.04D09:03:00.000000000 103.7 103.99 103.7 103.99 893
2016.01.04D09:06:00.000000000 103.7 103.7 103.7 103.7 335
For lower kdb versions you have to do as rianoc suggested.

How to have double backslash `\\` in vscode snippet

I want to get this snippet to work :
"General matrix": {
"prefix": "general-matrix-n-n-with-a-elements",
"body": [
"\\begin{equation}",
"\t \\begin{bmatrix}",
"\t\t a_{11} & a_{12} & a_{13} & \\dots & a_{1n} \\\\ ",
"\t\t a_{21} & a_{22} & a_{23} & \\dots & a_{2n} \\\\ ",
"\t\t \\vdots & \\vdots & \\vdots & \\ddots & \\vdots \\\\ ",
"\t\t a_{n1} & a_{n2} & a_{n3} & \\dots & a_{nn}",
"\t \\end{bmatrix}",
"\\end{equation}",
],
"description": "General n by n matrix"
So that it formats to this
\begin{equation}
\begin{bmatrix}
a_{11} & a_{12} & a_{13} & \dots & a_{1n} \\
a_{21} & a_{22} & a_{23} & \dots & a_{2n} \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
a_{n1} & a_{n2} & a_{n3} & \dots & a_{nn}
\end{bmatrix}
\end{equation}
But the backslashes are formatting to this
\begin{equation}
\begin{bmatrix}
a_{11} & a_{12} & a_{13} & \dots & a_{1n} \
a_{21} & a_{22} & a_{23} & \dots & a_{2n} \
\vdots & \vdots & \vdots & \ddots & \vdots \
a_{n1} & a_{n2} & a_{n3} & \dots & a_{nn}
\end{bmatrix}
\end{equation}
Note that there's not a double \\ at the end of the lines but a single \
Just add two more backslashes as in:
"General matrix": {
"prefix": "general-matrix-n-n-with-a-elements",
"body": [
"\\begin{equation}",
"\t \\begin{bmatrix}",
"\t\t a_{11} & a_{12} & a_{13} & \\dots & a_{1n} \\\\\\ ",
"\t\t a_{21} & a_{22} & a_{23} & \\dots & a_{2n} \\\\\\ ",
"\t\t \\vdots & \\vdots & \\vdots & \\ddots & \\vdots \\\\\\ ",
"\t\t a_{n1} & a_{n2} & a_{n3} & \\dots & a_{nn}",
"\t \\end{bmatrix}",
"\\end{equation}",
],
"description": "General n by n matrix"
}
Each backslash in a snippet that you want printed needs to be double-escaped, so that is 2 extra per each backslash for a total of 6 if you want 2 outputted.

Not call the HelpRequest function

I have a Input field created into a controller.
sap.ui.getCore().byId("SimpleFormChange354").addContent(new sap.m.Input({value : "", enabled:true, editable:true, showValueHelp:true, valueHelpOnly:true, valueHelpRequest:"handleValueHelp"}));
In the same controller I define the function:
handleValueHelp : function (oCOntroller) {
if (! this._oDialog) {
this._oDialog = sap.ui.xmlfragment("apps.appIntra.fragment.dialogClienti", this);
}
.....
},
But if i click on the suggestion element at the end of input field i have an error:
Uncaught TypeError: undefined is not a function sap-ui-core.js:122
a.fireEvent sap-ui-core.js:122
a.fireEvent sap-ui-core.js:134
(anonymous function) sap-ui-core.js:134
sap.m.Input._fireValueHelpRequestForValueHelpOnly Input.js:16
sap.m.Input.ontap Input.js:17
a._callEventHandles sap-ui-core.js:134
a._handleEvent sap-ui-core.js:134
U._handleEvent sap-ui-core.js:134
Q.extend.proxy.p sap-ui-core.js:16
Q.event.dispatch sap-ui-core.js:27
g jquery-mobile-custom.js:17
p jquery-mobile-custom.js:17
Q.event.dispatch sap-ui-core.js:27
Q.event.add.v3.handle sap-ui-core.js:27
Q.event.trigger sap-ui-core.js:27
(anonymous function) sap-ui-core.js:27
Q.extend.each sap-ui-core.js:16
Q.fn.Q.each sap-ui-core.js:16
Q.fn.extend.trigger sap-ui-core.js:27
P jquery-mobile-custom.js:17
R jquery-mobile-custom.js:17
Q.event.dispatch sap-ui-core.js:27
Q.event.add.v3.handle sap-ui-core.js:27
Instead, if I try to attach the function by:
sap.ui.getCore().byId("SimpleFormChange354").addContent(new sap.m.Input({value : "", enabled:true, editable:true, showValueHelp:true, valueHelpOnly:true}).attachValueHelpRequest(this.handleValueHelp(this)));
when in execution time I arrive at this code the handleValueHelp get fired (immediately, not even I click on suggestion item!).
Then, I try to click on the suggestion item i got this error:
Uncaught TypeError: Cannot read property 'call' of undefined sap-ui-core.js:122
a.fireEvent sap-ui-core.js:122
a.fireEvent sap-ui-core.js:134
(anonymous function) sap-ui-core.js:134
sap.m.Input._fireValueHelpRequestForValueHelpOnly Input.js:16
sap.m.Input.ontap Input.js:17
a._callEventHandles sap-ui-core.js:134
a._handleEvent sap-ui-core.js:134
U._handleEvent sap-ui-core.js:134
Q.extend.proxy.p sap-ui-core.js:16
Q.event.dispatch sap-ui-core.js:27
g jquery-mobile-custom.js:17
p jquery-mobile-custom.js:17
Q.event.dispatch sap-ui-core.js:27
Q.event.add.v3.handle sap-ui-core.js:27
Q.event.trigger sap-ui-core.js:27
(anonymous function) sap-ui-core.js:27
Q.extend.each sap-ui-core.js:16
Q.fn.Q.each sap-ui-core.js:16
Q.fn.extend.trigger sap-ui-core.js:27
P jquery-mobile-custom.js:17
R jquery-mobile-custom.js:17
Q.event.dispatch sap-ui-core.js:27
Q.event.add.v3.handle
In your first line you have:
valueHelpRequest:"handleValueHelp"}));
which is just a string.
Replace that string with the actual reference to your method:
valueHelpRequest:this.handleValueHelp}));
and it will work ;-)

I'd like to average the data by matlab

I'd like to average the data
However, length of the data is different each other
The number of data is seven
How can i solve this problem by matlab?
x_1= 6.45805700000000
6.45805700000000
6.53780000000000
6.57767200000000
6.71722200000000
6.87670800000000
7.17574400000000
7.43490900000000
7.81368900000000
8.31208300000000
8.79054100000000
9.42848500000000
10.0066220000000
10.7442450000000
11.5018040000000
12.2992340000000
13.1166000000000
13.9140310000000
14.7313970000000
15.5088910000000
16.2465140000000
16.9243300000000
17.6220810000000
18.1204750000000
18.6587410000000
19.1571350000000
19.5159780000000
19.8947580000000
20.1937940000000
20.3732160000000
20.5526380000000
20.6523160000000
20.7719310000000
20.7719310000000
20.8118020000000
20.7519950000000
20.7320590000000
20.7121240000000
20.5725730000000
20.4330230000000
20.3333440000000
20.2735370000000
20.0343080000000
19.9146930000000
19.6754640000000
19.4362350000000
19.1770700000000
18.9577770000000
18.6388050000000
18.2799610000000
17.9011820000000
17.6021460000000
17.2233660000000
16.8645230000000
16.5256150000000
16.1069640000000
15.6883130000000
15.3892770000000
15.0503690000000
14.7114610000000
14.3924890000000
14.0735170000000
13.8542230000000
13.6947370000000
13.4355730000000
13.2960220000000
13.1564720000000
13.0567930000000
12.9770500000000
12.9571140000000
12.8375000000000
12.8175640000000
12.7776930000000
12.7577570000000
12.7178850000000
12.7178850000000
12.5982710000000
12.5982710000000
12.5583990000000
12.5783350000000
12.5384630000000
12.4188490000000
12.3789770000000
12.3191700000000
12.2593630000000
12.1796200000000
12.0799410000000
11.9802620000000
11.8606480000000
11.7809050000000
11.7011620000000
11.6612900000000
11.5018040000000
11.4818680000000
11.3622540000000
11.3622540000000
11.2625750000000
11.1828320000000
11.0831530000000
11.0233460000000
10.9236670000000
10.8439240000000
10.7442450000000
10.7043740000000
10.6046950000000
10.5249520000000
10.4850800000000
10.4053370000000
10.3255940000000
10.2458510000000
10.2259160000000
10.1063010000000
10.0664290000000
9.92687900000000
9.88700800000000
9.80726500000000
9.70758600000000
9.66771400000000
9.62784300000000
9.56803600000000
9.50822800000000
9.50822800000000
9.42848500000000
9.38861400000000
9.32880600000000
9.30887100000000
9.32880600000000
9.20919200000000
9.14938500000000
9.08957700000000
9.06964200000000
8.96996300000000
8.96996300000000
8.89022000000000
8.81047700000000
8.81047700000000
8.73073400000000
8.71079800000000
8.65099100000000
8.61111900000000
8.61111900000000
8.49150500000000
8.51144000000000
8.39182600000000
8.41176200000000
8.31208300000000
8.29214700000000
8.31208300000000
8.21240400000000
8.17253200000000
8.11272500000000
8.07285400000000
8.07285400000000
7.97317500000000
7.91336800000000
7.89343200000000
7.85356000000000
7.75388100000000
7.71401000000000
7.67413800000000
7.61433100000000
7.61433100000000
7.57446000000000
7.59439500000000
7.47478100000000
7.45484500000000
7.41497400000000
7.35516600000000
7.29535900000000
7.25548800000000
7.25548800000000
7.13587300000000
7.09600100000000
7.03619400000000
6.99632300000000
6.91658000000000
6.87670800000000
6.81690100000000
6.73715800000000
6.69728600000000
6.63747900000000
6.59760700000000
6.53780000000000
6.45805700000000
6.49792900000000
6.39825000000000
6.37831400000000
6.27863500000000
6.25870000000000
x_2 = 6.25870000000000
6.27863500000000
6.29857100000000
6.25870000000000
6.25870000000000
6.31850700000000
6.43812100000000
6.57767200000000
6.81690100000000
7.03619400000000
7.35516600000000
7.73394600000000
8.23234000000000
8.71079800000000
9.30887100000000
9.94681500000000
10.6046950000000
11.3024460000000
12.0201340000000
12.7178850000000
13.4754440000000
14.2130670000000
14.9307540000000
15.5088910000000
16.2066430000000
16.7449080000000
17.2632380000000
17.7416960000000
18.1603470000000
18.4992550000000
18.7384840000000
19.0175840000000
19.1770700000000
19.3564920000000
19.4561710000000
19.4761070000000
19.5558500000000
19.5359140000000
19.5359140000000
19.5159780000000
19.4960430000000
19.4561710000000
19.3963640000000
19.3166210000000
19.1371990000000
19.0375200000000
18.9179060000000
18.6786770000000
18.4793190000000
18.2400900000000
18.0207970000000
17.6619530000000
17.3629170000000
17.0040730000000
16.6452290000000
16.3461930000000
15.9275420000000
15.6285060000000
15.2297910000000
14.8908830000000
14.5918460000000
14.2928100000000
13.9937740000000
13.7346090000000
13.5352510000000
13.3358940000000
13.1166000000000
12.9969860000000
12.8375000000000
12.8175640000000
12.6780140000000
12.6381420000000
12.5384630000000
12.5185280000000
12.4985920000000
12.4985920000000
12.5384630000000
12.4587200000000
12.4387850000000
12.4387850000000
12.3989130000000
12.3789770000000
12.2792990000000
12.2593630000000
12.2194910000000
12.1596840000000
12.0600050000000
12.0001980000000
11.8805830000000
11.8606480000000
11.7609690000000
11.6612900000000
11.6214190000000
11.5018040000000
11.4220610000000
11.5217400000000
11.2625750000000
11.2426390000000
11.1429600000000
11.0632170000000
11.0034100000000
10.9037310000000
10.8638600000000
10.7841170000000
10.6844380000000
10.6046950000000
10.5249520000000
10.4452090000000
10.3654660000000
10.3056590000000
10.2458510000000
10.1860440000000
10.1262370000000
10.0464940000000
9.98668600000000
9.90694300000000
9.86707200000000
9.80726500000000
9.78732900000000
9.70758600000000
9.64777900000000
9.48829200000000
9.54810000000000
9.54810000000000
9.42848500000000
9.32880600000000
9.32880600000000
9.32880600000000
9.26899900000000
9.28893500000000
9.20919200000000
9.14938500000000
9.10951300000000
9.08957700000000
9.00983400000000
8.98989900000000
8.95002700000000
8.93009100000000
8.83041200000000
8.77060500000000
8.71079800000000
8.65099100000000
8.65099100000000
8.57124800000000
8.59118300000000
8.49150500000000
8.47156900000000
8.39182600000000
8.41176200000000
8.33201800000000
8.27221100000000
8.19246800000000
8.19246800000000
8.15259700000000
8.11272500000000
8.07285400000000
8.05291800000000
8.01304600000000
7.99311100000000
7.93330300000000
7.89343200000000
7.91336800000000
7.81368900000000
7.81368900000000
7.79375300000000
7.77381700000000
7.73394600000000
7.75388100000000
7.71401000000000
7.67413800000000
7.67413800000000
7.63426700000000
7.59439500000000
7.61433100000000
7.51465200000000
7.53458800000000
7.43490900000000
7.41497400000000
7.33523100000000
7.33523100000000
7.27542300000000
7.19568000000000
7.11593700000000
7.09600100000000
7.05613000000000
6.97638700000000
6.91658000000000
6.87670800000000
6.79696500000000
6.81690100000000
6.73715800000000
6.65741500000000
6.61754300000000
6.51786400000000
6.51786400000000
6.43812100000000
6.43812100000000
6.37831400000000
x_3=6.37831400000000
6.37831400000000
6.43812100000000
6.37831400000000
6.41818600000000
6.47799300000000
6.63747900000000
6.83683700000000
7.07606600000000
7.41497400000000
7.73394600000000
8.17253200000000
8.77060500000000
9.30887100000000
9.90694300000000
10.6046950000000
11.3423180000000
12.0799410000000
12.8773710000000
13.6548660000000
14.4124250000000
15.1899190000000
15.9076060000000
16.5854220000000
17.2034310000000
17.7616320000000
18.2799610000000
18.7185480000000
19.1371990000000
19.4561710000000
19.7352720000000
20.0343080000000
20.1738580000000
20.3532800000000
20.4130870000000
20.5725730000000
20.5725730000000
20.5327020000000
20.5925090000000
20.5127660000000
20.5127660000000
20.4330230000000
20.3134090000000
20.2336660000000
20.1140510000000
19.9545650000000
19.7751430000000
19.5957210000000
19.4362350000000
19.2169420000000
18.9179060000000
18.6587410000000
18.3597040000000
18.0606680000000
17.7815680000000
17.3828520000000
17.0040730000000
16.6452290000000
16.3063220000000
15.9474780000000
15.5886340000000
15.2895980000000
14.9706260000000
14.6715900000000
14.4722320000000
14.2130670000000
14.0535810000000
13.8342880000000
13.6548660000000
13.5352510000000
13.4555080000000
13.3757650000000
13.2561510000000
13.2362150000000
13.1764080000000
13.1564720000000
13.1365360000000
13.0966650000000
13.0767290000000
12.9969860000000
13.0368570000000
12.9770500000000
12.9172430000000
12.8773710000000
12.7976280000000
12.7577570000000
12.6979500000000
12.6182060000000
12.5185280000000
12.4587200000000
12.3391060000000
12.2194910000000
12.1596840000000
12.0600050000000
11.9603260000000
11.8606480000000
11.7809050000000
11.7210970000000
11.6014830000000
11.5217400000000
11.5018040000000
11.3423180000000
11.2227030000000
11.1429600000000
11.0632170000000
10.9635390000000
10.8638600000000
10.8239880000000
10.7043740000000
10.6046950000000
10.5249520000000
10.4452090000000
10.3854020000000
10.2857230000000
10.2059800000000
10.0863650000000
10.0863650000000
10.0464940000000
9.90694300000000
9.84713600000000
9.84713600000000
9.72752200000000
9.70758600000000
9.68765000000000
9.58797100000000
9.54810000000000
9.54810000000000
9.48829200000000
9.42848500000000
9.36867800000000
9.36867800000000
9.34874200000000
9.30887100000000
9.24906300000000
9.24906300000000
9.18925600000000
9.24906300000000
9.12944900000000
9.08957700000000
9.06964200000000
9.04970600000000
8.98989900000000
8.91015500000000
8.91015500000000
8.89022000000000
8.85034800000000
8.79054100000000
8.79054100000000
8.73073400000000
8.65099100000000
8.71079800000000
8.61111900000000
8.59118300000000
8.51144000000000
8.43169700000000
8.45163300000000
8.39182600000000
8.35195400000000
8.35195400000000
8.29214700000000
8.25227500000000
8.17253200000000
8.17253200000000
8.11272500000000
8.07285400000000
7.97317500000000
7.95323900000000
7.93330300000000
7.83362500000000
7.77381700000000
7.75388100000000
7.69407400000000
7.65420300000000
7.61433100000000
7.55452400000000
7.43490900000000
7.39503800000000
7.33523100000000
7.29535900000000
7.23555200000000
7.13587300000000
7.11593700000000
7.05613000000000
7.03619400000000
6.93651500000000
6.89664400000000
6.93651500000000
6.83683700000000
x_4=6.83683700000000
6.85677200000000
6.85677200000000
6.91658000000000
7.01625800000000
7.15580900000000
7.31529500000000
7.51465200000000
7.79375300000000
8.19246800000000
8.57124800000000
9.08957700000000
9.60790700000000
10.2657870000000
10.8638600000000
11.5416760000000
12.2992340000000
13.0368570000000
13.7944160000000
14.4921680000000
15.2098550000000
15.9076060000000
16.5854220000000
17.1834950000000
17.6619530000000
18.2201540000000
18.6587410000000
19.0574560000000
19.3764280000000
19.6754640000000
19.9146930000000
20.0941150000000
20.2336660000000
20.3333440000000
20.4330230000000
20.4330230000000
20.5127660000000
20.5327020000000
20.4330230000000
20.3532800000000
20.3134090000000
20.1539230000000
20.0741800000000
19.9545650000000
19.7751430000000
19.6156570000000
19.4362350000000
19.1970060000000
18.9976490000000
18.6786770000000
18.4394480000000
18.1404110000000
17.8015030000000
17.4625950000000
17.2034310000000
16.7648440000000
16.4458720000000
16.1269000000000
15.7879920000000
15.4889560000000
15.2497260000000
14.9905620000000
14.7712680000000
14.5320390000000
14.3725530000000
14.2529390000000
14.0535810000000
13.9937740000000
13.9140310000000
13.8940950000000
13.8542230000000
13.8143520000000
13.7944160000000
13.7944160000000
13.7545450000000
13.7744800000000
13.7545450000000
13.7545450000000
13.7146730000000
13.6947370000000
13.5751230000000
13.5551870000000
13.4754440000000
13.4355730000000
13.3558300000000
13.2162790000000
13.0966650000000
13.0567930000000
12.8574360000000
12.7577570000000
12.5982710000000
12.5185280000000
12.3789770000000
12.2194910000000
12.1198130000000
11.9802620000000
11.8805830000000
11.8407120000000
11.6812260000000
11.5018040000000
11.4419970000000
11.3423180000000
11.2426390000000
11.1429600000000
11.0432820000000
10.9236670000000
10.8040530000000
10.7442450000000
10.6445660000000
10.5249520000000
10.4252730000000
10.3654660000000
10.3255940000000
10.1860440000000
10.1063010000000
9.98668600000000
9.92687900000000
9.86707200000000
9.76739300000000
9.64777900000000
9.60790700000000
9.56803600000000
9.48829200000000
9.44842100000000
9.36867800000000
9.36867800000000
9.28893500000000
9.20919200000000
9.14938500000000
9.06964200000000
9.02977000000000
8.96996300000000
8.93009100000000
8.89022000000000
8.83041200000000
8.75066900000000
8.71079800000000
8.71079800000000
8.65099100000000
8.61111900000000
8.55131200000000
8.45163300000000
8.47156900000000
8.45163300000000
8.39182600000000
8.35195400000000
8.31208300000000
8.23234000000000
8.21240400000000
8.15259700000000
8.13266100000000
8.11272500000000
8.01304600000000
7.99311100000000
7.99311100000000
7.91336800000000
7.87349600000000
7.85356000000000
7.83362500000000
7.75388100000000
7.69407400000000
7.63426700000000
7.59439500000000
7.59439500000000
7.79375300000000
7.53458800000000
7.49471700000000
7.47478100000000
7.45484500000000
7.35516600000000
7.33523100000000
7.29535900000000
7.19568000000000
7.17574400000000
7.09600100000000
7.05613000000000
6.99632300000000
6.91658000000000
6.91658000000000
6.83683700000000
6.77702900000000
6.73715800000000
6.65741500000000
6.59760700000000
6.59760700000000
6.57767200000000
6.51786400000000
6.49792900000000
6.47799300000000
6.45805700000000
x_5=6.45805700000000
6.47799300000000
6.47799300000000
6.53780000000000
6.61754300000000
6.67735000000000
6.81690100000000
7.07606600000000
7.27542300000000
7.63426700000000
7.95323900000000
8.51144000000000
9.02977000000000
9.58797100000000
10.2259160000000
10.9236670000000
11.6214190000000
12.4188490000000
13.1365360000000
13.8741590000000
14.6516540000000
15.3294690000000
15.9873490000000
16.6252940000000
17.2233660000000
17.7416960000000
18.2002180000000
18.5191910000000
18.8979700000000
19.1970060000000
19.3564920000000
19.5159780000000
19.6754640000000
19.6754640000000
19.7552070000000
19.7552070000000
19.7950790000000
19.6754640000000
19.6355930000000
19.5558500000000
19.4561710000000
19.3365570000000
19.2368780000000
19.1371990000000
18.9378410000000
18.8182270000000
18.5989340000000
18.3995760000000
18.1802830000000
17.9011820000000
17.6619530000000
17.3629170000000
17.0439450000000
16.7050370000000
16.3461930000000
15.9275420000000
15.6085700000000
15.2895980000000
14.8908830000000
14.5719110000000
14.2529390000000
13.8741590000000
13.6947370000000
13.4953800000000
13.2162790000000
13.0966650000000
12.9571140000000
12.8375000000000
12.7378210000000
12.6182060000000
12.5783350000000
12.4985920000000
12.4786560000000
12.4786560000000
12.4786560000000
12.3789770000000
12.3989130000000
12.3789770000000
12.3789770000000
12.3391060000000
12.2792990000000
12.2792990000000
12.1995560000000
12.1796200000000
12.1596840000000
12.1198130000000
12.0001980000000
12.0001980000000
11.8805830000000
11.8008400000000
11.7809050000000
11.7210970000000
11.5616110000000
11.5217400000000
11.4818680000000
11.4220610000000
11.3423180000000
11.2625750000000
11.1429600000000
11.1030890000000
10.9635390000000
10.9436030000000
10.8439240000000
10.7442450000000
10.7043740000000
10.6445660000000
10.5648230000000
10.4850800000000
10.4252730000000
10.4651450000000
10.3056590000000
10.2259160000000
10.1860440000000
10.1063010000000
10.0265580000000
10.0066220000000
9.92687900000000
9.84713600000000
9.80726500000000
9.72752200000000
9.70758600000000
9.64777900000000
9.58797100000000
9.54810000000000
9.46835700000000
9.44842100000000
9.44842100000000
9.38861400000000
9.32880600000000
9.36867800000000
9.26899900000000
9.26899900000000
9.18925600000000
9.14938500000000
9.12944900000000
9.08957700000000
9.06964200000000
9.04970600000000
9.00983400000000
8.95002700000000
8.91015500000000
8.89022000000000
8.83041200000000
8.85034800000000
8.75066900000000
8.65099100000000
8.69086200000000
8.65099100000000
8.65099100000000
8.57124800000000
8.53137600000000
8.55131200000000
8.47156900000000
8.45163300000000
8.41176200000000
8.37189000000000
8.31208300000000
8.31208300000000
8.29214700000000
8.21240400000000
8.19246800000000
8.19246800000000
8.13266100000000
8.09278900000000
8.11272500000000
8.05291800000000
8.03298200000000
7.99311100000000
7.95323900000000
7.97317500000000
7.89343200000000
7.89343200000000
7.83362500000000
7.73394600000000
7.75388100000000
7.71401000000000
7.65420300000000
7.59439500000000
7.51465200000000
7.49471700000000
7.43490900000000
7.35516600000000
7.29535900000000
7.23555200000000
7.19568000000000
7.17574400000000
7.11593700000000
7.03619400000000
7.01625800000000
6.99632300000000
6.93651500000000
6.93651500000000
6.89664400000000
6.85677200000000
6.83683700000000
x_6=6.83683700000000
6.83683700000000
6.91658000000000
6.93651500000000
7.01625800000000
7.17574400000000
7.27542300000000
7.53458800000000
7.87349600000000
8.29214700000000
8.69086200000000
9.24906300000000
9.84713600000000
10.5050160000000
11.1828320000000
11.9005190000000
12.6580780000000
13.5352510000000
14.2130670000000
15.0304330000000
15.7481200000000
16.4458720000000
17.1236880000000
17.7416960000000
18.2600260000000
18.8182270000000
19.2368780000000
19.5757860000000
19.9545650000000
20.2336660000000
20.4529590000000
20.6523160000000
20.7519950000000
20.8317380000000
20.8716100000000
20.8716100000000
20.8915450000000
20.8516740000000
20.7918670000000
20.7320590000000
20.6722520000000
20.5725730000000
20.4728950000000
20.2934730000000
20.1140510000000
19.9944360000000
19.7950790000000
19.5757860000000
19.3166210000000
19.0973270000000
18.8182270000000
18.4992550000000
18.2002180000000
17.8812460000000
17.5224030000000
17.1635590000000
16.8246510000000
16.4857430000000
16.1069640000000
15.8477990000000
15.4690200000000
15.2098550000000
14.9506900000000
14.7114610000000
14.5121030000000
14.2928100000000
14.2130670000000
14.0336450000000
13.9539020000000
13.8741590000000
13.8143520000000
13.7545450000000
13.6548660000000
13.7545450000000
13.6349300000000
13.5950590000000
13.5551870000000
13.5153160000000
13.5153160000000
13.4555080000000
13.4156370000000
13.3757650000000
13.3159580000000
13.3159580000000
13.2561510000000
13.1963430000000
13.1166000000000
13.0767290000000
12.9770500000000
12.9172430000000
12.8574360000000
12.7776930000000
12.6780140000000
12.5982710000000
12.4985920000000
12.4786560000000
12.3590420000000
12.2593630000000
12.1596840000000
12.0400700000000
11.9603260000000
11.9204550000000
11.8207760000000
11.7410330000000
11.7011620000000
11.5815470000000
11.5217400000000
11.4220610000000
11.3622540000000
11.3223820000000
11.2227030000000
11.2027680000000
11.1828320000000
11.0632170000000
10.9834740000000
10.9436030000000
10.8638600000000
10.8239880000000
10.7641810000000
10.7043740000000
10.6445660000000
10.6645020000000
10.5448880000000
10.5249520000000
10.4452090000000
10.4252730000000
10.3455300000000
10.2857230000000
10.2259160000000
10.2458510000000
10.1461730000000
10.1262370000000
10.0464940000000
10.0066220000000
9.94681500000000
9.90694300000000
9.86707200000000
9.74745700000000
9.76739300000000
9.70758600000000
9.68765000000000
9.60790700000000
9.56803600000000
9.50822800000000
9.44842100000000
9.36867800000000
9.38861400000000
9.26899900000000
9.24906300000000
9.18925600000000
9.14938500000000
9.04970600000000
9.02977000000000
8.93009100000000
8.89022000000000
8.83041200000000
8.77060500000000
8.75066900000000
8.69086200000000
8.65099100000000
8.63105500000000
8.57124800000000
8.59118300000000
8.57124800000000
8.49150500000000
8.47156900000000
8.45163300000000
8.41176200000000
8.37189000000000
8.35195400000000
8.33201800000000
8.29214700000000
8.29214700000000
8.25227500000000
8.27221100000000
8.21240400000000
8.25227500000000
8.23234000000000
8.19246800000000
8.15259700000000
8.17253200000000
8.07285400000000
8.05291800000000
8.03298200000000
7.97317500000000
7.91336800000000
7.95323900000000
7.85356000000000
7.81368900000000
7.81368900000000
7.73394600000000
7.67413800000000
7.61433100000000
7.59439500000000
7.51465200000000
7.43490900000000
7.35516600000000
7.39503800000000
7.25548800000000
7.21561600000000
7.17574400000000
7.03619400000000
7.01625800000000
6.99632300000000
6.95645100000000
6.89664400000000
6.87670800000000
6.83683700000000
6.81690100000000
6.73715800000000
x_7=6.73715800000000
6.77702900000000
6.75709400000000
6.79696500000000
6.83683700000000
6.93651500000000
7.05613000000000
7.27542300000000
7.53458800000000
7.87349600000000
8.31208300000000
8.83041200000000
9.34874200000000
9.96675100000000
10.6645020000000
11.3821900000000
12.1397480000000
12.9571140000000
13.7744800000000
14.5719110000000
15.3294690000000
16.0670920000000
16.8047150000000
17.4825310000000
18.1204750000000
18.6986120000000
19.2169420000000
19.7153360000000
20.1140510000000
20.3931520000000
20.6523160000000
20.8915450000000
21.0510320000000
21.1706460000000
21.2703250000000
21.3899390000000
21.3500680000000
21.3500680000000
21.3301320000000
21.2503890000000
21.1706460000000
21.1706460000000
21.0310960000000
20.9114810000000
20.7519950000000
20.6523160000000
20.4728950000000
20.2536010000000
20.0941150000000
19.8548860000000
19.5757860000000
19.3365570000000
19.0175840000000
18.6786770000000
18.3597040000000
18.0008610000000
17.6619530000000
17.2632380000000
16.9243300000000
16.6851010000000
16.2465140000000
15.9873490000000
15.6484420000000
15.3892770000000
15.1699830000000
14.9307540000000
14.7712680000000
14.6117820000000
14.4323600000000
14.3725530000000
14.2529390000000
14.1333240000000
14.0735170000000
14.1133880000000
13.9738380000000
13.9539020000000
13.9339660000000
13.8542230000000
13.8940950000000
13.8741590000000
13.8542230000000
13.7944160000000
13.8143520000000
13.7744800000000
13.7146730000000
13.6548660000000
13.5551870000000
13.5153160000000
13.4156370000000
13.3757650000000
13.2960220000000
13.1365360000000
13.0368570000000
12.9571140000000
12.8574360000000
12.7378210000000
12.6979500000000
12.5583990000000
12.4786560000000
12.3989130000000
12.2992340000000
12.1596840000000
12.0998770000000
12.0400700000000
11.9403910000000
11.8407120000000
11.7210970000000
11.6612900000000
11.5416760000000
11.4818680000000
11.3821900000000
11.2825110000000
11.2625750000000
11.1628960000000
11.0632170000000
11.0632170000000
10.9635390000000
10.9037310000000
10.7841170000000
10.6844380000000
10.6645020000000
10.6046950000000
10.5050160000000
10.4850800000000
10.3854020000000
10.3455300000000
10.2657870000000
10.1661080000000
10.0863650000000
10.0863650000000
10.0265580000000
9.98668600000000
9.92687900000000
9.92687900000000
9.86707200000000
9.78732900000000
9.74745700000000
9.74745700000000
9.64777900000000
9.64777900000000
9.60790700000000
9.58797100000000
9.46835700000000
9.44842100000000
9.40854900000000
9.34874200000000
9.30887100000000
9.30887100000000
9.30887100000000
9.24906300000000
9.20919200000000
9.16932000000000
9.14938500000000
9.10951300000000
9.10951300000000
9.02977000000000
9.02977000000000
8.95002700000000
8.91015500000000
8.83041200000000
8.85034800000000
8.79054100000000
8.79054100000000
8.77060500000000
8.75066900000000
8.73073400000000
8.67092600000000
8.61111900000000
8.59118300000000
8.51144000000000
8.45163300000000
8.43169700000000
8.35195400000000
8.19246800000000
8.23234000000000
8.11272500000000
8.09278900000000
8.07285400000000
7.95323900000000
7.89343200000000
7.91336800000000
7.81368900000000
7.75388100000000
7.71401000000000
7.65420300000000
7.61433100000000
7.61433100000000
7.59439500000000
7.63426700000000
7.59439500000000
7.63426700000000
7.57446000000000
Length of the data array is different.
I'd like to average this 7 data.
If you need to find the mean of values which are stored in several vectors, first sum all the values of both vectors. Then use length() to find out how many entries are in each vector. Add the lengths and you will have the total number of entries. Then you can divide your sum total by the number of entries to get the mean.
Exactly how you do this will depend on your data (how many vectors you have, whether you always have the same number).
So if your variables were a, b, c, d, e, f, g:
sumOfVectors = sum(a) + sum(b) + ... etc
numberOfItems = length(a) + length(b) + ... etc
averageAllData = sumOfVectors/numberOfItems
You could also potentially make this work for an arbitrary number of items by using a loop.
Use mean and just concatenate all your vectors:
mean([x1 x2 x3 x4 x5 x6 x7]);
If they're column vectors concatenate vertically:
mean([x1; x2; x3; x4; x5; x6; x7]);