solve a non-linear least squares optimization - matlab

I want to fit data with my custom function to calculate parameters of the model. Data of x and y are attached at the end. The custom function is:
y=a+(-((4/3)*3.14*((60e-10)^3-((60e-10)-x).^3).*b*(c-1096)/c+4*3.14*(60e-10)^2.*(d.*((60e-10)-x).^2/(60e-10)^2+e+(f-e-d.*((60e-10)-x).^2/(60e-10)^2).*exp(-x./g)))/(1e3*1.38e-23*1090))
and parameters have constraints and initials:
-inf<a<inf, a=2e4
1e11<b<1e12, b=7.8e11
1120<c<1300, c=1200
70<d<130, d=127
300<e<700, e=680
400<f<900, f=850
1e-10<g<3e-10, g=2.5e-10
However, I both tried matlab and rigin to fit data with the model, but they all failed to find a good fit. I am appreciate if you can provide any suggestions. In fact, I understand there are too many parameters, and I also tried to fix parameter b, d, e and g while free others, but still no good results.
x=[3.70400000000000e-10
3.80400000000000e-10
3.90400000000000e-10
4.00400000000000e-10
4.10400000000000e-10
4.20400000000000e-10
4.30400000000000e-10
4.40400000000000e-10
4.50400000000000e-10
4.60400000000000e-10
4.70400000000000e-10
4.80400000000000e-10
4.90400000000000e-10
5.00400000000000e-10
5.10400000000000e-10
5.20400000000000e-10
5.30400000000000e-10
5.40400000000000e-10
5.50400000000000e-10
5.60400000000000e-10
5.70400000000000e-10
5.80400000000000e-10
5.90400000000000e-10
6.00400000000000e-10
6.10400000000000e-10
6.20400000000000e-10
6.30400000000000e-10
6.40400000000000e-10
6.50400000000000e-10
6.60400000000000e-10
6.70400000000000e-10
6.80400000000000e-10
6.90400000000000e-10
7.00400000000000e-10
7.10400000000000e-10
7.20400000000000e-10
7.30400000000000e-10
7.40400000000000e-10
7.50400000000000e-10
7.60400000000000e-10
7.70400000000000e-10
7.80400000000000e-10
7.90400000000000e-10
8.00400000000000e-10
8.10400000000000e-10
8.20400000000000e-10
8.30400000000000e-10
8.40400000000000e-10
8.50400000000000e-10
8.60400000000000e-10
8.70400000000000e-10
8.80400000000000e-10
8.90400000000000e-10
9.00400000000000e-10
9.10400000000000e-10
9.20400000000000e-10
9.30400000000000e-10
9.40400000000000e-10
9.50400000000000e-10
9.60400000000000e-10
9.70400000000000e-10
9.80400000000000e-10
9.90400000000000e-10
1.00040000000000e-09
1.01040000000000e-09
1.02040000000000e-09
1.03040000000000e-09
1.04040000000000e-09
1.05040000000000e-09
1.06040000000000e-09
1.07040000000000e-09
1.08040000000000e-09
1.09040000000000e-09
1.10040000000000e-09
1.11040000000000e-09
1.12040000000000e-09
1.13040000000000e-09
1.14040000000000e-09
1.15040000000000e-09
1.16040000000000e-09
1.17040000000000e-09
1.18040000000000e-09
1.19040000000000e-09
1.20040000000000e-09
1.21040000000000e-09
1.22040000000000e-09
1.23040000000000e-09
1.24040000000000e-09
1.25040000000000e-09
1.26040000000000e-09
1.27040000000000e-09
1.28040000000000e-09
1.29040000000000e-09
1.30040000000000e-09
1.31040000000000e-09
1.32040000000000e-09
1.33040000000000e-09
1.34040000000000e-09
1.35040000000000e-09
1.36040000000000e-09
1.37040000000000e-09
1.38040000000000e-09
1.39040000000000e-09
1.40040000000000e-09
1.41040000000000e-09
1.42040000000000e-09
1.43040000000000e-09
1.44040000000000e-09
1.45040000000000e-09
1.46040000000000e-09
1.47040000000000e-09
1.48040000000000e-09
1.49040000000000e-09
1.50040000000000e-09
1.51040000000000e-09
1.52040000000000e-09
1.53040000000000e-09
1.54040000000000e-09
1.55040000000000e-09
1.56040000000000e-09
1.57040000000000e-09
1.58040000000000e-09
1.59040000000000e-09
1.60040000000000e-09
1.61040000000000e-09
1.62040000000000e-09
1.63040000000000e-09
1.64040000000000e-09
1.65040000000000e-09
1.66040000000000e-09
1.67040000000000e-09
1.68040000000000e-09
1.69040000000000e-09
1.70040000000000e-09
1.71040000000000e-09
1.72040000000000e-09
1.73040000000000e-09
1.74040000000000e-09
1.75040000000000e-09
1.76040000000000e-09
1.77040000000000e-09
1.78040000000000e-09
1.79040000000000e-09
1.80040000000000e-09
1.81040000000000e-09
1.82040000000000e-09
1.83040000000000e-09
1.84040000000000e-09
1.85040000000000e-09
1.86040000000000e-09
1.87040000000000e-09
1.88040000000000e-09
1.89040000000000e-09]
y=[-22.8405306447565
-22.2450287793417
-21.6577585104770
-21.0787198381626
-20.5079127623984
-19.9453372831843
-19.3909934005205
-18.8448811144068
-18.3070004248434
-17.7773513318301
-17.2559338353671
-16.7427479354542
-16.2377936320915
-15.7410709252790
-15.2525798150167
-14.7723203013046
-14.3002923841427
-13.8364960635310
-13.3809313394694
-12.9335982119581
-12.4944966809970
-12.0636267465860
-11.6409884087253
-11.2265816674147
-10.8204065226543
-10.4224629744442
-10.0327510227842
-9.65127066767441
-9.27802190911481
-8.91300474710541
-8.55621918164621
-8.20766521273719
-7.86734284037838
-7.53525206456975
-7.21139288531131
-6.89576530260307
-6.58836931644503
-6.28920492683717
-5.99827213377951
-5.71557093727205
-5.44110133731477
-5.17486333390769
-4.91685692705081
-4.66708211674411
-4.42553890298761
-4.19222728578130
-3.96714726512519
-3.75029884101927
-3.54168201346354
-3.34129678245801
-3.14914314800267
-2.96522111009752
-2.78953066874256
-2.62207182393780
-2.46284457568323
-2.31184892397886
-2.16908486882468
-2.03455241022069
-1.90825154816689
-1.79018228266329
-1.68034461370989
-1.57873854130667
-1.48536406545365
-1.40022118615082
-1.32330990339818
-1.25463021719574
-1.19418212754349
-1.14196563444144
-1.09798073788958
-1.06222743788791
-1.03470573443643
-1.01541562753515
-1.00435711718406
-1.00153020338316
-1.00693488613246
-1.02057116543195
-1.04243904128163
-1.07253851368151
-1.11086958263158
-1.15743224813184
-1.21222651018230
-1.27525236878295
-1.34650982393380
-1.42599887563483
-1.51371952388606
-1.60967176868748
-1.71385561003910
-1.82627104794091
-1.94691808239291
-2.07579671339511
-2.21290694094750
-2.35824876505008
-2.51182218570286
-2.67362720290583
-2.84366381665899
-3.02193202696235
-3.20843183381589
-3.40316323721964
-3.60612623717357
-3.81732083367770
-4.03674702673202
-4.26440481633653
-4.50029420249125
-4.74441518519615
-4.99676776445124
-5.25735194025653
-5.52616771261201
-5.80321508151769
-6.08849404697355
-6.38200460897961
-6.68374676753587
-6.99372052264231
-7.31192587429896
-7.63836282250579
-7.97303136726282
-8.31593150857004
-8.66706324642746
-9.02642658083506
-9.39402151179286
-9.76984803930086
-10.1539061633590
-10.5461958839674
-10.9467172011260
-11.3554701148348
-11.7724546250937
-12.1976707319029
-12.6311184352622
-13.0727977351718
-13.5227086316315
-13.9808511246414
-14.4472252142016
-14.9218309003119
-15.4046681829724
-15.8957370621831
-16.3950375379440
-16.9025696102550
-17.4183332791163
-17.9423285445278
-18.4745554064895
-19.0150138650013
-19.5637039200634
-20.1206255716756
-20.6857788198381
-21.2591636645507
-21.8407801058135
-22.4306281436265
-23.0287077779897
-23.6350190089032
-24.2495618363668
-24.8723362603805
-25.5033422809445
-26.1425798980587
-26.7900491117231]

Related

Getting faulty FFT results in MATLAB

I am working on a signal. The problem I am facing is that when I apply FFT at a higher resolution, the results are distorted or inaccurate.
% This is the Signal
ppg=[112.876329616814
112.658408873981
112.621201482138
112.229109437548
111.965434300402
111.819245235084
111.841263181141
112.034975558851
112.229725672171
112.401002397509
112.483441565446
112.537095785523
112.542167639986
112.517623071764
112.530208400404
112.494331187315
112.458340941558
112.491893571651
112.446357268045
112.437848223891
112.468898497367
112.492229975598
112.513807423899
112.558165404527
112.585333504471
112.632528318017
112.602232391053
112.667122234561
112.702144016400
112.742078840809
112.770641027009
112.705587358155
112.725453248592
112.610860932793
112.505600920437
112.487277414681
112.411549384328
112.371246006390
112.360145209525
112.353754972283
112.326490619891
112.334771225799
112.308532889401
112.351352504480
112.374822910342
112.400805703872
112.377898361460
112.427400530787
112.441468011030
112.487825137776
112.439115590095
112.466759319904
112.452625972089
112.406563665424
112.280788492275
112.293628779368
112.168353755994
112.159275439531
112.124102673341
112.135144200310
112.114654566371
112.100083083019
112.080270978462
112.120150827635
112.134439453760
112.156685466933
112.225453576662
112.287027263325
112.333599889113
112.355033113993
112.378141995004
112.429045612203
112.457869702086
112.446108693452
112.182607770090
112.172291031572
112.141941738264
112.135048950453
112.071363786720
112.093823632894
112.118452285912
112.154260471553
112.122354546715
112.204188788361
112.260325725976
112.317032864848
112.257972343352
112.363700230453
112.436783319341
112.457697907478
112.438722450783
112.430362124392
112.355503599989
112.242165740932
112.166705570292
112.163616654977
112.085798076462
112.184362698808
112.153380937729
112.262361656787
112.224531961545
112.244349806038
112.299966267499
112.255424005753
112.312405810283
112.331168831169
112.383220614130
112.364187970045
112.365720855222
112.410753157449
112.456950646392
112.432425527838
112.372746578952
112.211072664360
112.188389081123
112.172113289760
112.151095732411
112.158093342346
112.287870215162
112.293031150688
112.266507326308
112.271329839831
112.304199076742
112.265933856062
112.310326900020
112.339695911893
112.378147248247
112.473536985823
112.514993681027
112.529122799596
112.528742074844
112.605329735200
112.526943835385
112.462135267330
112.385319738140
112.441471501166
112.448451454950
112.449974353958
112.425600543248
112.436932348697
112.427383074442
112.447754859520
112.503825754972
112.486296171361
112.388719124013
112.426279602750
112.464391817333
112.495840760547
112.551141668789
112.513411425176
112.628942486085
112.571133412043
112.408067990111
112.379208267462
112.387577797402
112.394219329184
112.364188099482
112.405313640608
112.384305237246
112.374023983266
112.386142882234
112.416160605464
112.480669827844
112.498013584519
112.543765218506
112.551326412918
112.570091215874
112.521257936741
112.468922209407
112.417916186082
112.428681276432
112.453331488272
112.479538244438
112.488535687381
112.488068838927
112.489596706596
112.501862088722
112.473300725428
112.486755477968
112.452806047650
112.546537015539
112.595369631167
112.660854755442
112.715084510180
112.668289105923
112.564813138360
112.491403530284
112.498697082319
112.526036994318
112.521722414456
112.606011734873
112.613438869378
112.706794350468
112.709914268738
112.733341821577
112.788090993973
112.816951022833
112.840548340548
112.899414311179
112.964519140990
112.982683982684
112.965834818776
112.868129587150
112.819760603335
112.801068716104
112.895339954163
112.905992700110
112.922162804516
112.960653154463
113.001264968797
112.995510620634
112.925014237129
112.945664727579
112.950660002563
112.977230979538
113.027126318937
113.051945832799
113.176574533880
113.106155752061
113.102652825836
113.047802127387
113.064266941043
113.117979232419
113.114727965440
113.159112129700
113.113070092937
113.136957813428
113.121019379042
113.399967215369
113.367061789600
113.352146693361
113.305748879779
113.282189807311
113.220978471920
113.180702182517
113.104017968821
113.072536204024
113.083557606049
113.054936135674
113.066598316887
113.074672134649
113.116066470161
113.150241360161
113.135717031911
113.158955957111
113.205006621385
113.220812508010
113.243111623734
113.224913494810
113.259296712421
113.241617859265
113.191664544606
113.174093879976
113.077189191491
112.950745439788
112.943312401213
112.979259030598
113.077073253544
113.066505390035
113.098221698138
113.112731541459
113.102715466352
113.106468207118
113.153820205768
113.150868611908
113.173089897116
113.190293472761
113.178402766065
113.102167313206
112.926472532296
112.876893709052
112.789109583227
112.758169934641
112.724514048043
112.742182884575
112.739968811373
112.716794140972
112.710236798825
112.740984371850
112.784984456069
112.821738161678
112.854162908890
112.815290685626
112.797747606299
112.842966380452
112.773617048632
112.618259350926
112.600013906049
112.505248769236
112.509846150566
112.570719946351
112.616040728203
112.521252509718
112.567446968445
112.599698745483
112.592843342328
112.646111102240
112.596601770668
112.669232120331
112.641172136137
112.655610256191
112.661025833021
112.679463209493
112.738903840403
112.870380719711
112.912401324166
112.846829640947
112.798192004074
112.701758108839
112.530854766149
112.482880849863
112.499466017344
112.508394207356
112.488060147806
112.514289375881
112.493186381306
112.543918757086
112.665845288267
112.688900287130
112.807218755271
112.834668578175
112.703031331897
112.722244399380
112.785603653376
112.802255542740
112.855312059464
113.013241660300
113.030387912741
112.873026095195
112.718142594729
112.708659062754
112.668631722842
112.641462685292
112.656627792729
112.647315135204
112.655517108804
112.647229697979
112.676961852279
112.704985262079
112.707932846341
112.761287364656
112.732347290155
112.734565047584
112.867568213821
112.931068507103
112.988718817859
113.096054398748
113.131037108322
113.183455193348
113.132948220611
113.114479676168
113.036346770113
113.004849047057
112.972971833361
112.874736268792
112.791262804419
112.823775318571
112.846056722087
112.780428706548
112.763848953305
112.728996296355
112.773206229775
112.818483253410
112.864382694037
112.884692557840
112.890568367494
113.008012709447
113.036289097277
113.060172622443
113.033218358328
112.958648383101
112.867703803842
112.856821465318
112.857759746664
112.812466347153
112.872717982564
112.837206331634
112.842406051915
112.787900435554
112.820527036897
112.793913965998
112.821891809763
112.848107872062
112.864297202015
112.906432063394
112.934805994312
112.981381931212
112.980988998115
112.895035105583
112.860105450029
112.734561363358
112.710121401466
112.679145097747
112.668994599551
112.650356920091
112.639027724380
112.633687897817
112.596479986330
112.606518860267
112.616728608655
112.644709299842
112.671664744329
112.718424966814
112.752544288479
112.800183391354
112.828843621553
112.836520468927
112.803382077760
112.756687708242
112.647200882837
112.720451876531
112.670787365554
112.628967979851
112.599208268020
112.606262959222
112.650391603175
112.636879961639
112.698316834841
112.726519381039
112.739990757021
112.749811260567
112.763804561646
112.805069697711
112.804922370644
112.787026705349
112.659918037149
112.610357123849
112.557432540316
112.647731010409
112.613608632452
112.721092680038
112.671744081352
112.679526699929
112.647638618922
112.596299125711
112.617944147356
112.659663865546
112.672608437314
112.815456927925
112.851304541265
112.844278288642
112.858829482206
112.776522179120
112.762180282434
112.665898203276
112.590707988075
112.541139358148
112.539482418919
112.496684314953
112.622777795404
112.623454635828
112.685556206676
112.762185866082
112.779739938865
112.826916274674
112.853017416599
112.912892207147
112.941246033883
112.824242167026
112.738681577523
112.694177285142
112.670372062871
112.650307661243
112.731169561481
112.723954630818
112.750522551963
112.748358072765
112.786045475284
112.788209954482
112.717587252766
112.748643684053
112.803537101115
112.848135332564
112.996763891394
113.041028379858
113.026433931036
112.865621916413
112.784671882484
112.758984310443
112.742009947915
112.811968768794
112.795005180797
112.850054464784
112.833737831853
112.863392795501
112.917648809208
112.922372245514
112.964116624954
112.952604995503
112.978151993996
113.111056881240
113.091364364609
113.087417373129
113.022313234093
113.048170783465
113.005984211867
112.918286860859
112.845102311077
112.917435294243
112.912325894544
112.986173841887
112.982177965291
112.969758901485
113.015487785406
113.035499494385
113.073436585236
113.091114353573
113.143344019256
113.152078343712
113.138629565365
113.029550531249
112.999786406938
113.001871231548
112.944465472846
112.925657196778
112.934570869563
112.898286983639
112.883933529839
112.917383628208
112.930283224401
112.954291084626
112.966045943799
113.022342824547
112.982367248748
113.058469521207
113.086284808983
113.120224563791
113.109032812815
113.087716690906
112.994595973283
112.973766293114
112.963393962581
112.926665710202
112.837771418237
112.826324244391
112.789232330639
112.760623402571
112.776947070295
112.770400599385
112.789997502564
112.834024344161
112.869151467090
112.917605607566
112.979117293856
112.991755880699
113.099321569644
113.117088724731
113.111462458953
113.077239534035
113.051189070670
112.982163939956
112.733214497920
112.660555131143
112.666393455711
112.657877789546
112.629605777879
112.607975985821
112.594947016590
112.720315398887
112.731953111823
112.676844003321
112.589539568575
112.565206994947
112.649276966720
112.690694195410
112.811581244345
112.779338429967
112.782398694936
112.670864180447
112.586601663748
112.472449158812
112.419992655238
112.385291315617
112.420904481893
112.401797661760
112.370877026501
112.368957814657
112.355779226664
112.339231355657
112.379705400982
112.323382422601
112.426832714032
112.464321318712
112.489143125223
112.519381374049
112.572308971782
112.602206027391
112.663735749034
112.648479760247
112.670776347760
112.673502086054
112.581578209853
112.445712951862
112.365070087250
112.285572864830
112.283231056635
112.352623189410
112.346652308119
112.261601264576
112.336333783224
112.319318651285
112.430092061360
112.539214032721
112.561519649182
112.602462472592
112.659892055996
112.698304941811
112.689704039384
112.718808331527
112.742074844141
112.769783145527
112.848751897453
112.852209478833
112.753921403272
112.597653254932
112.542998101664
112.424751718869
112.416136151430
112.383375290730
112.383843652369
112.432141484045
112.376051817829
112.401556237992
112.435193119342
112.484551396316
112.568140153991
112.584591350369
112.616983628509
112.675009166122
112.691247814743
112.678780137314
112.724381286923
112.762318377774
112.794712104655
112.772516524673
112.740466006004
112.687882249794
112.674818441755
112.640000000000
112.634551283412
112.631111865990
112.640299595185
112.624341044859
112.671663466091
112.631888645187
112.650431733043
112.652424290808
112.670477406993
112.712800042578
112.747032838363
112.819220483702
112.872867089045
112.895640841512
112.982858114499
112.951486232292
112.873234339241
112.770168190420
112.730335581203
112.705770717275
112.733941827399
112.723419211230
112.694379029250
112.707733248177
112.768700217330
112.721197161699
112.725248831147
112.766703806970
112.794789872040
112.816438122090
112.878081079927
112.903840403264
112.937225638865
112.960049445338
112.964184098635
112.933323387432
112.831712694237
112.793200771091
112.782526642392
112.729847494553
112.734418386091
112.733778661563
112.714714490583
112.762150491777
112.803538259291
112.881079704609
112.870258503691
112.884309352863
112.926109837875
112.882563641299
112.843088438348
112.881174131157
112.887102363296
112.799948737665
112.723396984066
112.740602525896
112.713009138277
112.673583790719
112.647579884840
112.640203008882
112.649798055587
112.665700956479
112.664807442573
112.702267366497
112.702138070418
112.707149686604
112.704724660475
112.714009147963
112.776382603523
112.762589621939
112.777789569758
112.748628452767
112.652080195432
112.583522410266
112.587021198461
112.549789143972
112.629551936017
112.598230764335
112.580138077536
112.599350332265
112.593478122142
112.629726455398
112.622927088877
112.645608358037
112.700083079479
112.736548730932
112.748022658972
112.763486359480
112.686832967642
112.630338921671
112.594039579916
112.567010034585
112.567051443446
112.664309298115
112.659111726488
112.672446479923
112.641678905136
112.629395621929
112.687345454159
112.710956070428
112.723440645466
112.764388384002
112.820705902373
112.860454374107
112.830046828709
112.803797266733
112.761874422605
112.747494713127
112.730746750832
112.774562906367
112.782335861137
112.743012414087
112.786450631403
112.808693110869
112.776847807001
112.801021874501
112.831963873964
112.895573864725
112.939550729266
112.975818286225
112.995294368146
112.958335994550
112.885950905878
112.860914181090
112.830554313337
112.824644448936
112.817971356952
112.786524505735
112.826588980798
112.837622457870
112.868628774630
112.899616134050
112.916733475978
112.958273824377
112.960524988452
113.000366750116
113.059006013216
113.075905873106
113.005940678236
113.051680712456
113.008421164133
113.030962343096
112.963405447273
112.916720601810
112.872636070417
112.913275201522
112.950258511209
113.012960099472
113.055979765454
113.097724144894
113.130966614061
113.159350060042
113.182694453596
113.279546732591
113.244320894651
113.284396101802
113.235240306060
113.171662298804
113.090696884815
113.107843137255
113.092436974790
113.093752652576
113.092182327476
113.099185128597
113.227498902772
113.197294739124
113.227188396020
113.218671359899
113.283900096563
113.317013336117
113.378421900161
113.399042194511
113.381879480963
113.512548477458
113.439232431426
113.321390905303
113.323803880143
113.361110967975
113.412681318115
113.366601492607
113.347833527810
113.362395954881
113.370822060354
113.384016649324
113.451904266389
113.580478668054
113.728158168574
113.827679500520
113.865265348595
113.809698231009
113.761331945890
113.697776944002
113.674306141805
113.628662795854
113.641871669465
113.609810316487
113.597728447128
113.606890676367
113.644694558964
113.662243692295
113.647199171210
113.617383840816
113.651233177986
113.704795233537
113.723400584505
113.734986119316
113.731371419595
113.656888516521
113.558812113837
113.470775502485
113.379366863843
113.381950927839
113.364125104245
113.361062011885
113.337396476395
113.348935522955
113.362446697472
113.357621278002
113.322746144253
113.343246983546
113.389510684536
113.434052960027
113.486422668241
113.510541406645
113.558399392815
113.603896103896
113.674122952416
113.680395283123
113.574607584679
113.491860574955
113.435709971375
113.305364634473
113.214855952794
113.173845781459
113.152789636235
113.110105898399
113.047487709621
113.056834021513
112.979051308504
112.981518836672
112.896989257519
112.890903341415
112.905779822322
112.939854537789
112.916809152893
112.967830397637
112.979242772980
113.016871845767
113.058077873788
113.087556824189
113.102476930549
112.977970585123
112.850536746491
112.711549161434
112.653528168678
112.567575999535
112.448132075672
112.387445887446
112.501011975038
112.449148254343
112.442846416599
112.363574634229
112.380932171920
112.431016627810
112.462349733154
112.549883216550
112.573139897911
112.600575641766
112.635347372773
112.668974180930
112.736447410232
112.691326029347
112.723530130272
112.745652658271
112.729972397601
112.546976625747
112.501247292237
112.469553887791
112.392396548893
112.348796932350
112.374886972339
112.345571166445
112.300013793250
112.293053507199
112.218810042099
112.245591812187
112.279271271868
112.302902245475
112.327810569006
112.388697582083
112.445113870424
112.538805130871
112.526097855649
112.669085816145
112.697988286224
112.766906558513
112.739500758981
112.602941098708
112.537984890926
112.521254488057
112.437173216394
112.441516275932
112.442275253420
112.411637382226
112.395869136442
112.444813418432
112.426294484736
112.441558441558
112.466098836229
112.511511216057
112.577205262270
112.612793051105
112.650531286895
112.698255415591
112.649981756939
112.711361704599
112.728677996167
112.662580444205
112.593273043074
112.544956366113
112.532201439153
112.500652000612
112.481677492204
112.441406703922
112.457461763680
112.458517084933
112.466004632127
112.475141977855
112.581024934404
112.610842743788
112.666170407091
112.705448824551
112.735562277937
112.783287666894
112.854903863394
112.874816744539
112.910592429308
112.891203288884
112.795108838876
112.711074509307
112.707363094924
112.640407144026
112.581805113678
112.594477405163
112.586524530178
112.653450815388
112.590329602814
112.742738282529
112.710432386986
112.737506147118
112.868991398212
112.945437679204
112.957117557767
113.008686119076
113.039551357733
113.068519143194
113.023907910272
112.943498060381
112.874936751560
112.764622210001
112.712248535778
112.702105084458
112.799352767922
112.785688979605
112.778497512070
112.777820668066
112.791399850883
112.807347987711
112.837890573361
112.929372575476
112.981826614944
112.996753246753
113.072061055827
113.084921571935
113.063501433631
113.011384719177
112.923132062742
112.873882610896
112.886152808231
112.881388092427
112.867852926294
112.916006071850
112.873713948389
112.903398549502
112.927770281666
112.945522010457
112.944678697925
112.982416933716
113.025334565131
113.056032434829
113.047535453305
113.107732070695
113.095308986095
113.032213106965
112.923251293622
112.960412190448
112.905031297045
112.916363559577
112.897297411561
112.903592681457
112.956315625544
112.910176347725
112.920159691193
112.983844740566
112.976755007509
112.949639374775
112.909763157339
113.012684409362
113.005972858319
113.011043514507
112.989701154272
112.916285233110
112.902571478428
112.863145315235
112.855277003696
112.857645957708
112.849429328603
112.880512706809
112.838292803761
112.885120760195
112.924818687806
112.970484061393
112.993127002867
113.021757463316
113.083024118738
113.109040310339
113.113467701130
113.140411536515
113.079735199865
113.015053128689
112.948220610558
112.913180974869
112.889357395851
112.920349131388
112.928107606679
112.843684868695
112.834049925524
112.841148942014
112.950187042616
112.913744836839
112.969818615903
112.989847983858
113.030202512122
113.064014443635
113.106541898322
113.090548481364
113.003111874257
112.913253203012
112.884900251812
112.864191657284
112.792375304458
112.843887206962
112.834250027739
112.801771941788
112.886278403989
112.885010722473
112.902927287901
112.963148184370
112.982390848105
113.061101571787
113.061566503764
113.073500089673
113.036153984112
112.957925522368
112.887396661493
112.842334209665
112.784268118623
112.738200422198
112.760106363295
112.785861928601
112.799801338849
112.888949940563
112.912212832749
112.933104776416
112.934267036199
113.003531177976
113.073671631689
113.060981477663
113.113893078245
113.048182658044
112.967801132708
112.895467863270
112.864553253266
112.853150323347
112.847699478908
112.822404645638
112.816829879900
112.801256391681
112.797914474415
112.815669325537
112.796273700517
112.891981929019
112.904777793667
112.894693842906
112.800232281906
112.762425919861
112.749383661080
112.750566187145
112.775736575781
112.823823961293
112.845966131776
112.886278403989
112.912398509180
112.947831499436
112.879348411701
112.800371853245
112.754045529709
112.670261583032
112.655782729717
112.627535542519
112.604494869583
112.630485818828
112.646390727776
112.645925424589
112.672659207716
112.702015608807
112.721093039487
112.743468787680
112.770229411143
112.817676871773
112.766263913492
112.697818787510
112.614623367149
112.602999994716
112.577427655112
112.579201032700
112.560641192601
112.578947089975
112.606965437337
112.631891563400
112.662072758619
112.679038135078
112.794822252489
112.832685606722
112.863078265930
112.888521865256
112.864477611940
112.812711842001
112.686404424868
112.678558796357
112.641732720649
112.578676011307
112.615560519602
112.614374794880
112.612045692749
112.610309452979
112.649268979536
112.663335223389
112.692162982825
112.747426091099
112.772229260200
112.803057368056
112.788210508485
112.783006992267
112.722104127669
112.613386634517
112.617308241566
112.577745337607
112.561453312854
112.597722578253
112.623438253068
112.610337625254
112.618459667398
112.655389577770
112.671083732121
112.698245502713
112.827257081921
112.831670394399
112.909570447734
112.935303193625
112.880180922791
112.776615306575
112.747320126012
112.652852207862
112.659744130376
112.651878812246
112.600182284491
112.641136974986
112.697833933110
112.700793185265
112.696147152024
112.714176131705
112.751842309910
112.804024779267
112.818287141126
112.873332522616
112.878427725137
112.861686105195
112.792101801816
112.693639174440
112.672878623715
112.695034486404
112.623252909392
112.634868891064
112.671595647418
112.686646830954
112.713207786443
112.739936183251
112.764659890539
112.819052046574
112.847104557074
112.889001627666
112.862724767099
112.891866008455
112.950558719783
112.921001152573
112.872900258999
112.794438507201
112.737104218323
112.731066403292
112.692672959138
112.666673733979
112.666744459885
112.681328231815
112.713788370947
112.772031877145
112.767795954899
112.812621477484
112.858661898439
112.909132239051
112.912673253703
112.943186509575
112.983010969212
113.042426421219
112.953027946203
112.919942268346
112.805392421405
112.789054315736
112.778985008940
112.779773926468
112.762175041034
112.732118079461
112.731847302377
112.729404543963
112.773917917156
112.794378776495
112.835505936334
112.878070959181
112.913640424846
112.965060450966
113.006860827739
113.036291558750
113.091496300674
113.047187191520
113.014839676609
112.890575692062
112.799196234996
112.730050897855
112.763251630360
112.671648277105
112.687937594928
112.693620578370
112.712914457462
112.732441436201
112.777377239812
112.777207386769
112.803838077153
112.873979058145
112.898788077301
112.952209883457
112.986443794047
112.998658115233
112.975398264713
112.925978162686
112.844087896756
112.769369121552
112.739309236608
112.722380292565
112.701140796972
112.685846091989
112.697805861620
112.688607380507
112.695595100727
112.750064739115
112.782810574691
112.822130874347
112.864538860762
112.839426181780
112.896561207544
112.941422837531
112.972688419191
112.982433098013
112.984937925193
112.987531013760
112.876596871112
112.792115283787
112.759534161984
112.736528246329
112.645863154881
112.660371856792
112.641582856628
112.613123671277
112.642007226184
112.680703314385
112.663567533224
112.731067401163
112.799277035847
112.818936587377
112.858213411831
112.843781937568
112.890465725860
112.904651347278
112.954312681996
112.905692285740
112.849322596327
112.793270348530
112.734855377584
112.652752868729
112.665888035683
112.619094498608
112.637108627380
112.610155861471
112.634085981704
112.689817726362
112.698928992238
112.700286005805
112.718379096311
112.769973893099
112.826288697932
112.829268034526
112.860185939268
112.889748549323
112.907650487080
112.832690629215
112.739543474694
112.691882280095
112.604031605074
112.586744216788
112.575068513443
112.579530894266
112.594114721661
112.601844560133
112.606148366196
112.628071381362
112.632981336602
112.647011901680
112.661046173375
112.774216754032
112.830412635610
112.849116385352
112.868299027668
112.914696629213
112.753143298440
112.688562535341
112.664109739775
112.667961493885
112.694501492664
112.658762253605
112.672004405753
112.660620059760
112.675877852889
112.674426971999
112.736409995980
112.741841899075
112.742419433335
112.792756964864
112.832110615446
112.869024715110
112.889495167396
112.912854997991
112.933389669378
112.805691005425
112.698962668751
112.659793378827
112.626032577694
112.646348427487
112.711601462600
112.663522345128
112.715546992441
112.721602337448
112.750756085697
112.751197362363
112.733124625889
112.747608629018
112.771385518281
112.779097688687
112.799550956864
112.848592781046
112.919277127550
112.906771905137
112.928969204652
112.858294363445
112.849042939532
112.746521700044
112.691440024114
112.662444377424
112.728673719418
112.744762035807
112.731252610597
112.706423522072
112.687772475784
112.703116324081
112.686785347846
112.730461401103
112.643943770460
112.672834711054
112.731149712625
112.820871121146
112.859066971647
112.912744837836
112.843613515392
112.855656007885
112.766372375492
112.719626267227
112.721040414640
112.667989263625
112.643333951910
112.677352138066
112.742010086951
112.706234751822
112.709704730659
112.728877039294
112.744113096374
112.767936245523
112.800770419286
112.858292223328
112.867948473888
112.865343563080
112.840126188309
112.861425758506
112.870724122612
112.746474406411
112.674705421929
112.634342408665
112.602645782623
112.593931951473
112.604358210217
112.643647519306
112.661250396699
112.653322895288
112.645027595103
112.670175234448
112.614255576763
112.571695053577
112.642482771751
112.649653347446
112.732807621064
112.740168643342
112.766906003151
112.721348243285
112.673965100728
112.574154389042
112.518313789113
112.496391275611
112.490913801399
112.527866128273
112.505977550448
112.520531279588
112.526394870221
112.454569502788
112.462915235580
112.443148070703
112.492045268165
112.509187490410
112.560360198300
112.600307899039
112.644358585405
112.654760331714
112.648286289790
112.515672803108
112.431449350539
112.406233116876
112.326448341343
112.338243247542
112.321748439272
112.338723530597
112.355109090716
112.362145150523
112.356283202732
112.350968727134
112.399291975368
112.414724368554
112.445467369515
112.510425177467
112.543168482816
112.625077483033
112.610657868214
112.563606010017
112.504964659256
112.456854620789
112.409611735900
112.374617364502
112.441843483782
112.403548752955
112.412858126357
112.423915691363
112.415915231788
112.417626773881
112.483904630233
112.519247170001
112.469354573909
112.493885743641
112.565511621878
112.559966560316
112.577647613348
112.517781390841
112.377592856123
112.343035596136
112.334369588128
112.349533669437
112.416761473376
112.383361290288
112.398389256063
112.379469746311
112.395694005390
112.400989129111
112.470376430345
112.488404469877
112.495812608260
112.505389843258
112.561216979683
112.591114469769
112.619121801811
112.516461960631
112.427560080001
112.333125218256
112.293336437423
112.250013239983
112.242514113821
112.296787099711
112.282709315257
112.236650247350
112.218886260198
112.232105201810
112.243210308251
112.283822859624
112.318899848496
112.330765889370
112.395738591191
112.420077383792
112.470084655076
112.477463975724
112.465540143629
112.347171731089
112.314996982179
112.312381597468
112.233054575132
112.212605692825
112.290747170611
112.342638801420
112.357445095827
112.368607552027
112.371789714383
112.380696369986
112.393493317518
112.406201681740
112.443310105268
112.468193492017
112.551605814292
112.593362511047
112.635954211805
112.684823750819
112.612275987559
112.494043966739
112.412144566069
112.369511395137
112.357544976459
112.372275173717
112.387008684516
112.395791121997
112.383240631466
112.381022878081
112.416690940097
112.435019607636
112.416736853815
112.480348698200
112.422027094300
112.486599248160
112.501021996759
112.528938923779
112.582434939312
112.585154040859
112.583967566767
112.463769958573
112.427055155291
112.371582033839
112.307583101576
112.305029596774
112.306598199287
112.351449006623
112.348290157086
112.335625830567
112.297951267077];
% plotting frequency domain
plot(abs(fft(ppg,1024)));
the result i get for 1024 point resolution is,
% plotting frequency domain
plot(abs(fft(ppg,2048)));
the result I get for 2048 point resolution is,
In my knowledge, increasing resolution does not distort the fft result. If someone knows why is this happening please let me know.
Note: I am using property editor from figure window to zoom out my results.
fft(ppg,2048) pads ppg with zeros to make it 2048 elements long, then applies the FFT. Padding your signal with zeros is bad because it introduces a big jump, your signal is all close to 112. This jump will influence the output of the FFT much more than the actual data.
If you want to increase the resolution of the frequency domain that you compute, you will have to sample your signal for longer. There are no shortcuts.

What is "unk" in the pretrained GloVe vector files (e.g. glove.6B.50d.txt)?

I found "unk" token in the glove vector file glove.6B.50d.txt downloaded from https://nlp.stanford.edu/projects/glove/. Its value is as follows:
unk -0.79149 0.86617 0.11998 0.00092287 0.2776 -0.49185 0.50195 0.00060792 -0.25845 0.17865 0.2535 0.76572 0.50664 0.4025 -0.0021388 -0.28397 -0.50324 0.30449 0.51779 0.01509 -0.35031 -1.1278 0.33253 -0.3525 0.041326 1.0863 0.03391 0.33564 0.49745 -0.070131 -1.2192 -0.48512 -0.038512 -0.13554 -0.1638 0.52321 -0.31318 -0.1655 0.11909 -0.15115 -0.15621 -0.62655 -0.62336 -0.4215 0.41873 -0.92472 1.1049 -0.29996 -0.0063003 0.3954
Is it a token to be used for unknown words or is it some kind of abbreviation?
The unk token in the pretrained GloVe files is not an unknown token!
See this google groups thread where Jeffrey Pennington (GloVe author) writes:
The pre-trained vectors do not have an unknown token, and currently the code just ignores out-of-vocabulary words when producing the co-occurrence counts.
It's an embedding learned like any other on occurrences of "unk" in the corpus (which appears to happen occasionally!)
Instead, Pennington suggests (in the same post):
...I've found that just taking an average of all or a subset of the word vectors produces a good unknown vector.
You can do that with the following code (should work with any pretrained GloVe file):
import numpy as np
GLOVE_FILE = 'glove.6B.50d.txt'
# Get number of vectors and hidden dim
with open(GLOVE_FILE, 'r') as f:
for i, line in enumerate(f):
pass
n_vec = i + 1
hidden_dim = len(line.split(' ')) - 1
vecs = np.zeros((n_vec, hidden_dim), dtype=np.float32)
with open(GLOVE_FILE, 'r') as f:
for i, line in enumerate(f):
vecs[i] = np.array([float(n) for n in line.split(' ')[1:]], dtype=np.float32)
average_vec = np.mean(vecs, axis=0)
print(average_vec)
For glove.6B.50d.txt this gives:
[-0.12920076 -0.28866628 -0.01224866 -0.05676644 -0.20210965 -0.08389011
0.33359843 0.16045167 0.03867431 0.17833012 0.04696583 -0.00285802
0.29099807 0.04613704 -0.20923874 -0.06613114 -0.06822549 0.07665912
0.3134014 0.17848536 -0.1225775 -0.09916984 -0.07495987 0.06413227
0.14441176 0.60894334 0.17463093 0.05335403 -0.01273871 0.03474107
-0.8123879 -0.04688699 0.20193407 0.2031118 -0.03935686 0.06967544
-0.01553638 -0.03405238 -0.06528071 0.12250231 0.13991883 -0.17446303
-0.08011883 0.0849521 -0.01041659 -0.13705009 0.20127155 0.10069408
0.00653003 0.01685157]
And because it is fairly compute intensive to do this with the larger glove files, I went ahead and computed the vector for glove.840B.300d.txt for you:
0.22418134 -0.28881392 0.13854356 0.00365387 -0.12870757 0.10243822 0.061626635 0.07318011 -0.061350107 -1.3477012 0.42037755 -0.063593924 -0.09683349 0.18086134 0.23704372 0.014126852 0.170096 -1.1491593 0.31497982 0.06622181 0.024687296 0.076693475 0.13851812 0.021302193 -0.06640582 -0.010336159 0.13523154 -0.042144544 -0.11938788 0.006948221 0.13333307 -0.18276379 0.052385733 0.008943111 -0.23957317 0.08500333 -0.006894406 0.0015864656 0.063391194 0.19177166 -0.13113557 -0.11295479 -0.14276934 0.03413971 -0.034278486 -0.051366422 0.18891625 -0.16673574 -0.057783455 0.036823478 0.08078679 0.022949161 0.033298038 0.011784158 0.05643189 -0.042776518 0.011959623 0.011552498 -0.0007971594 0.11300405 -0.031369694 -0.0061559738 -0.009043574 -0.415336 -0.18870236 0.13708843 0.005911723 -0.113035575 -0.030096142 -0.23908928 -0.05354085 -0.044904727 -0.20228513 0.0065645403 -0.09578946 -0.07391877 -0.06487607 0.111740574 -0.048649278 -0.16565254 -0.052037314 -0.078968436 0.13684988 0.0757494 -0.006275573 0.28693774 0.52017444 -0.0877165 -0.33010918 -0.1359622 0.114895485 -0.09744406 0.06269521 0.12118575 -0.08026362 0.35256687 -0.060017522 -0.04889904 -0.06828978 0.088740796 0.003964443 -0.0766291 0.1263925 0.07809314 -0.023164088 -0.5680669 -0.037892066 -0.1350967 -0.11351585 -0.111434504 -0.0905027 0.25174105 -0.14841858 0.034635577 -0.07334565 0.06320108 -0.038343467 -0.05413284 0.042197507 -0.090380974 -0.070528865 -0.009174437 0.009069661 0.1405178 0.02958134 -0.036431845 -0.08625681 0.042951006 0.08230793 0.0903314 -0.12279937 -0.013899368 0.048119213 0.08678239 -0.14450377 -0.04424887 0.018319942 0.015026873 -0.100526 0.06021201 0.74059093 -0.0016333034 -0.24960588 -0.023739101 0.016396184 0.11928964 0.13950661 -0.031624354 -0.01645025 0.14079992 -0.0002824564 -0.08052984 -0.0021310581 -0.025350995 0.086938225 0.14308536 0.17146006 -0.13943303 0.048792403 0.09274929 -0.053167373 0.031103406 0.012354865 0.21057427 0.32618305 0.18015954 -0.15881181 0.15322933 -0.22558987 -0.04200665 0.0084689725 0.038156632 0.15188617 0.13274793 0.113756925 -0.095273495 -0.049490947 -0.10265804 -0.27064866 -0.034567792 -0.018810693 -0.0010360252 0.10340131 0.13883452 0.21131058 -0.01981019 0.1833468 -0.10751636 -0.03128868 0.02518242 0.23232952 0.042052146 0.11731903 -0.15506615 0.0063580726 -0.15429358 0.1511722 0.12745973 0.2576985 -0.25486213 -0.0709463 0.17983761 0.054027 -0.09884228 -0.24595179 -0.093028545 -0.028203879 0.094398156 0.09233813 0.029291354 0.13110267 0.15682974 -0.016919162 0.23927948 -0.1343307 -0.22422817 0.14634751 -0.064993896 0.4703685 -0.027190214 0.06224946 -0.091360025 0.21490277 -0.19562101 -0.10032754 -0.09056772 -0.06203493 -0.18876675 -0.10963594 -0.27734384 0.12616494 -0.02217992 -0.16058226 -0.080475815 0.026953284 0.110732645 0.014894041 0.09416802 0.14299914 -0.1594008 -0.066080004 -0.007995227 -0.11668856 -0.13081996 -0.09237365 0.14741232 0.09180138 0.081735 0.3211204 -0.0036552632 -0.047030564 -0.02311798 0.048961394 0.08669574 -0.06766279 -0.50028914 -0.048515294 0.14144728 -0.032994404 -0.11954345 -0.14929578 -0.2388355 -0.019883996 -0.15917352 -0.052084364 0.2801028 -0.0029121689 -0.054581646 -0.47385484 0.17112483 -0.12066923 -0.042173345 0.1395337 0.26115036 0.012869649 0.009291686 -0.0026459037 -0.075331464 0.017840583 -0.26869613 -0.21820338 -0.17084768 -0.1022808 -0.055290595 0.13513643 0.12362477 -0.10980586 0.13980341 -0.20233242 0.08813751 0.3849736 -0.10653763 -0.06199595 0.028849555 0.03230154 0.023856193 0.069950655 0.19310954 -0.077677034 -0.144811
Since I can't comment, writing another answer.
If anyone's having trouble using the above vector given by #jayelm because copy pasting won't work. I am writing 2 lines of code that will give you the vector ready to be used in python.
vec_string = '0.22418134 -0.28881392 0.13854356 0.00365387 -0.12870757 0.10243822 0.061626635 0.07318011 -0.061350107 -1.3477012 0.42037755 -0.063593924 -0.09683349 0.18086134 0.23704372 0.014126852 0.170096 -1.1491593 0.31497982 0.06622181 0.024687296 0.076693475 0.13851812 0.021302193 -0.06640582 -0.010336159 0.13523154 -0.042144544 -0.11938788 0.006948221 0.13333307 -0.18276379 0.052385733 0.008943111 -0.23957317 0.08500333 -0.006894406 0.0015864656 0.063391194 0.19177166 -0.13113557 -0.11295479 -0.14276934 0.03413971 -0.034278486 -0.051366422 0.18891625 -0.16673574 -0.057783455 0.036823478 0.08078679 0.022949161 0.033298038 0.011784158 0.05643189 -0.042776518 0.011959623 0.011552498 -0.0007971594 0.11300405 -0.031369694 -0.0061559738 -0.009043574 -0.415336 -0.18870236 0.13708843 0.005911723 -0.113035575 -0.030096142 -0.23908928 -0.05354085 -0.044904727 -0.20228513 0.0065645403 -0.09578946 -0.07391877 -0.06487607 0.111740574 -0.048649278 -0.16565254 -0.052037314 -0.078968436 0.13684988 0.0757494 -0.006275573 0.28693774 0.52017444 -0.0877165 -0.33010918 -0.1359622 0.114895485 -0.09744406 0.06269521 0.12118575 -0.08026362 0.35256687 -0.060017522 -0.04889904 -0.06828978 0.088740796 0.003964443 -0.0766291 0.1263925 0.07809314 -0.023164088 -0.5680669 -0.037892066 -0.1350967 -0.11351585 -0.111434504 -0.0905027 0.25174105 -0.14841858 0.034635577 -0.07334565 0.06320108 -0.038343467 -0.05413284 0.042197507 -0.090380974 -0.070528865 -0.009174437 0.009069661 0.1405178 0.02958134 -0.036431845 -0.08625681 0.042951006 0.08230793 0.0903314 -0.12279937 -0.013899368 0.048119213 0.08678239 -0.14450377 -0.04424887 0.018319942 0.015026873 -0.100526 0.06021201 0.74059093 -0.0016333034 -0.24960588 -0.023739101 0.016396184 0.11928964 0.13950661 -0.031624354 -0.01645025 0.14079992 -0.0002824564 -0.08052984 -0.0021310581 -0.025350995 0.086938225 0.14308536 0.17146006 -0.13943303 0.048792403 0.09274929 -0.053167373 0.031103406 0.012354865 0.21057427 0.32618305 0.18015954 -0.15881181 0.15322933 -0.22558987 -0.04200665 0.0084689725 0.038156632 0.15188617 0.13274793 0.113756925 -0.095273495 -0.049490947 -0.10265804 -0.27064866 -0.034567792 -0.018810693 -0.0010360252 0.10340131 0.13883452 0.21131058 -0.01981019 0.1833468 -0.10751636 -0.03128868 0.02518242 0.23232952 0.042052146 0.11731903 -0.15506615 0.0063580726 -0.15429358 0.1511722 0.12745973 0.2576985 -0.25486213 -0.0709463 0.17983761 0.054027 -0.09884228 -0.24595179 -0.093028545 -0.028203879 0.094398156 0.09233813 0.029291354 0.13110267 0.15682974 -0.016919162 0.23927948 -0.1343307 -0.22422817 0.14634751 -0.064993896 0.4703685 -0.027190214 0.06224946 -0.091360025 0.21490277 -0.19562101 -0.10032754 -0.09056772 -0.06203493 -0.18876675 -0.10963594 -0.27734384 0.12616494 -0.02217992 -0.16058226 -0.080475815 0.026953284 0.110732645 0.014894041 0.09416802 0.14299914 -0.1594008 -0.066080004 -0.007995227 -0.11668856 -0.13081996 -0.09237365 0.14741232 0.09180138 0.081735 0.3211204 -0.0036552632 -0.047030564 -0.02311798 0.048961394 0.08669574 -0.06766279 -0.50028914 -0.048515294 0.14144728 -0.032994404 -0.11954345 -0.14929578 -0.2388355 -0.019883996 -0.15917352 -0.052084364 0.2801028 -0.0029121689 -0.054581646 -0.47385484 0.17112483 -0.12066923 -0.042173345 0.1395337 0.26115036 0.012869649 0.009291686 -0.0026459037 -0.075331464 0.017840583 -0.26869613 -0.21820338 -0.17084768 -0.1022808 -0.055290595 0.13513643 0.12362477 -0.10980586 0.13980341 -0.20233242 0.08813751 0.3849736 -0.10653763 -0.06199595 0.028849555 0.03230154 0.023856193 0.069950655 0.19310954 -0.077677034 -0.144811'
import numpy as np
average_glove_vector = np.array(vec_string.split(" "))
print(average_glove_vector)

Normalize each column in matrix colormap MATLAB

I'm using MATLAB to plot a colormap of the following data matrix:
1010.89914200000 1006.07847500000 1013.91775300000 1016.37012500000 1012.64447500000 1005.15384200000 998.323644400000 1007.09643600000 1010.39007800000 1010.71070000000 1007.75920300000 1003.43986900000 1001.77407500000 1000.93290600000 1009.19935000000 1010.79651100000 1006.15733600000 1001.08001400000 1006.62765600000 1008.98760600000 1012.59690300000 1014.13669400000 1012.41850000000 1002.83265600000
1010.20939200000 1006.22354400000 1014.13985000000 1016.01628600000 1012.16700600000 1004.47184200000 1000.64279200000 1006.93063300000 1009.98950000000 1010.53409400000 1007.46695300000 1003.07056100000 1001.31949400000 1001.61572800000 1009.12864700000 1010.45935000000 1006.24603900000 1001.40907500000 1006.31782500000 1009.00493300000 1012.13883300000 1013.93106700000 1011.88797800000 1003.01553600000
1009.70062500000 1006.35064700000 1014.37573900000 1015.70891100000 1011.51357800000 1003.79413100000 1001.69951400000 1006.79389200000 1009.72253100000 1010.41560600000 1007.01026100000 1002.91738300000 1000.86708100000 1002.11736400000 1009.09675300000 1009.98591400000 1005.46058600000 1000.94756700000 1006.18716400000 1008.73213100000 1012.14396700000 1013.51734400000 1010.97627200000 1003.29271400000
1009.45768300000 1006.17825800000 1014.67340300000 1015.64428600000 1011.30645600000 1003.37367500000 1001.93843600000 1006.59857800000 1009.45626700000 1010.25717800000 1006.66668100000 1003.00867800000 1001.13924400000 1002.74437200000 1009.14411900000 1009.62172200000 1005.50861100000 1000.11247800000 1006.11126700000 1008.63767200000 1012.11852500000 1013.46424200000 1010.52458300000 1003.95781100000
1009.26808100000 1006.29626900000 1014.67797500000 1015.67235600000 1011.20240600000 1003.14341400000 1000.42042500000 1006.97025800000 1009.47529700000 1010.42883100000 1006.41034400000 1003.31582500000 1001.22851700000 1003.87331700000 1009.01971100000 1009.26751700000 1004.97643300000 1000.38995600000 1006.25921900000 1008.81359400000 1012.25596700000 1013.53560600000 1010.21200300000 1004.63438300000
1009.71863900000 1006.81711100000 1014.88478900000 1016.09375300000 1011.26197200000 1003.11559200000 1000.71963300000 1007.50932500000 1009.46868300000 1010.70578900000 1006.41695000000 1003.87943100000 1001.47584700000 1004.88967200000 1009.38281100000 1009.50196100000 1005.06519200000 1001.66275800000 1006.49482200000 1009.35829200000 1012.54210000000 1013.92888300000 1009.72913100000 1005.35431100000
1010.74544400000 1007.71330600000 1015.30482800000 1016.41307200000 1011.40723900000 1003.05097800000 1001.88330600000 1007.78023100000 1009.79253600000 1011.11156400000 1006.55320300000 1004.49287800000 1001.40507500000 1005.91256700000 1009.88450300000 1009.38280000000 1004.75816700000 1003.58816900000 1006.68395600000 1009.83212800000 1012.71196100000 1014.27383300000 1009.46791900000 1005.91156100000
1011.06202800000 1008.61448600000 1016.07176900000 1016.77051900000 1011.43023100000 1002.91816900000 1003.01835800000 1008.37585300000 1010.16145800000 1011.46680800000 1006.80956900000 1004.88291700000 1001.64883900000 1006.73743100000 1010.37819200000 1009.44031900000 1005.11520300000 1004.70793600000 1007.29316900000 1010.53632800000 1013.30822200000 1014.53464700000 1009.54564700000 1006.43934700000
1011.16811700000 1009.12379400000 1016.69230000000 1017.09807500000 1011.42089200000 1002.90685800000 1003.45940000000 1008.64450600000 1010.42875300000 1011.61208900000 1006.92791100000 1004.99500600000 1001.85114700000 1007.48185600000 1010.74164700000 1009.37652200000 1005.22774400000 1005.74404200000 1008.04547500000 1011.20978900000 1013.70315600000 1014.90081400000 1009.46251700000 1007.25164700000
1010.77128100000 1009.35747200000 1016.79156100000 1016.94504400000 1011.34709700000 1002.68326400000 1004.21865300000 1008.90464200000 1010.65171700000 1011.66855800000 1006.76375000000 1004.84766700000 1001.64799400000 1007.95280800000 1011.15295600000 1008.96945800000 1004.99150800000 1006.73475300000 1008.30754700000 1011.69105600000 1014.00060300000 1015.01862800000 1009.08597500000 1007.85208300000
1010.13805300000 1009.61241400000 1016.74593600000 1016.61859700000 1011.07230300000 1002.35865300000 1004.26001400000 1008.88295800000 1010.48621700000 1011.41217200000 1006.14741900000 1004.82872800000 1001.26854200000 1008.04161100000 1011.11477800000 1008.65341400000 1004.63091100000 1007.43303300000 1008.40434700000 1011.74642800000 1014.01016900000 1014.80443600000 1008.33869400000 1007.93218300000
1009.50911900000 1009.62698100000 1016.46591900000 1015.96478900000 1010.07972200000 1001.85613100000 1004.44510800000 1008.68885000000 1009.90488600000 1010.78808600000 1005.41067200000 1004.68175000000 1000.73121900000 1007.96492200000 1011.01123900000 1008.22990300000 1003.85685000000 1007.24613600000 1008.27287800000 1012.14434200000 1013.92860000000 1014.61665800000 1007.55034400000 1008.09293300000
1008.70381100000 1009.61384700000 1015.81295800000 1015.06458300000 1008.88961700000 1000.62531700000 1004.21893300000 1008.20705000000 1009.58456400000 1010.16761700000 1004.43428100000 1004.27616900000 1000.27990000000 1007.68135000000 1010.75977200000 1007.51076700000 1002.70041700000 1006.61412500000 1008.12120300000 1012.10416700000 1013.70059700000 1014.09623100000 1006.09171400000 1008.05956900000
1008.02154700000 1009.64861100000 1015.14255300000 1014.23098600000 1008.14283900000 999.389411100000 1004.11294400000 1008.03047200000 1009.17975600000 1009.66578900000 1003.65600000000 1003.73793600000 999.649786100000 1007.55710300000 1010.73914200000 1006.48525600000 1001.60153900000 1006.51005600000 1007.86194700000 1011.76237200000 1013.33892200000 1013.76143300000 1004.98931400000 1007.96544700000
1007.77482500000 1009.85345300000 1014.92648900000 1013.59322500000 1007.68484400000 998.743208300000 1004.23994200000 1008.15078900000 1009.14176900000 1009.13383600000 1003.04438300000 1003.35990600000 999.229216700000 1007.35725800000 1010.77036400000 1006.11508100000 1001.06650600000 1006.27331900000 1008.08580600000 1011.76860000000 1013.18307200000 1013.39113600000 1003.78306100000 1007.80175600000
1007.69477800000 1010.25384700000 1014.99210800000 1013.30303900000 1007.45265800000 998.250572200000 1004.45173600000 1008.31279400000 1009.06058100000 1008.82283300000 1002.55153300000 1003.10945300000 999.019630600000 1007.24711700000 1010.81812500000 1006.09366700000 1000.98814200000 1006.25510800000 1008.09595800000 1011.79827200000 1013.07516400000 1013.10823300000 1003.03183900000 1008.06458600000
1007.77405000000 1010.73199400000 1015.15546900000 1013.15583900000 1007.25787500000 997.884352800000 1004.75770600000 1008.85976700000 1009.25861700000 1008.55503600000 1002.43732200000 1002.93201900000 998.928380600000 1007.53712200000 1010.76891400000 1006.20278600000 1000.95717200000 1006.24851400000 1008.26927500000 1011.92516700000 1013.04778600000 1012.83340000000 1002.36345600000 1008.45907200000
1008.10153900000 1011.22165600000 1015.49348900000 1013.28646400000 1007.37516700000 997.841966700000 1005.30818900000 1009.36494400000 1009.81374200000 1008.59688100000 1002.46048900000 1003.12547200000 998.873250000000 1008.09001100000 1010.74253600000 1006.00015800000 1001.09626700000 1006.44443300000 1008.61596400000 1012.13335000000 1013.32301100000 1012.72540800000 1001.82905800000 1008.71992200000
1008.42932800000 1012.08600000000 1015.93560300000 1013.55619200000 1007.18396400000 997.877988900000 1005.97368300000 1009.70238900000 1010.35090600000 1008.72040000000 1002.82235000000 1003.50095000000 998.968997200000 1008.71467200000 1011.18516100000 1006.09722800000 1001.00105000000 1006.51150600000 1008.80134200000 1012.38964200000 1013.64155000000 1012.74316400000 1001.41934400000 1008.87543300000
1008.61755800000 1012.61210000000 1016.07700000000 1013.93586700000 1007.27577800000 997.712516700000 1006.77127200000 1010.00605300000 1010.65426700000 1008.88601400000 1003.20735600000 1003.72689700000 999.271758300000 1009.20620300000 1011.16123600000 1006.69687200000 1000.70609700000 1006.79953300000 1009.01541700000 1012.91482800000 1014.02131100000 1012.95065300000 1001.67870000000 1009.32203600000
1008.56708100000 1012.99515000000 1016.33867800000 1013.68418100000 1007.24658600000 997.281041700000 1007.01185000000 1010.30151400000 1010.94030600000 1008.70953300000 1003.34373100000 1004.04526700000 999.558302800000 1009.36840300000 1011.30540300000 1006.56111700000 1000.80576400000 1007.06003900000 1009.30639400000 1013.20931400000 1014.27723600000 1013.05665800000 1001.85187500000 1009.70395300000
1008.29791700000 1013.28623100000 1016.51517200000 1014.03927800000 1006.84327200000 997.159275000000 1007.09736400000 1010.48451100000 1010.96097800000 1008.46591400000 1003.29630300000 1003.91275300000 1000.09343100000 1009.50430800000 1011.42889700000 1006.72751400000 1000.51083900000 1007.10306100000 1009.37503100000 1013.39047200000 1014.59432200000 1013.03755800000 1002.26636900000 1010.06034200000
1008.21371700000 1013.59691400000 1016.65878900000 1013.99910800000 1006.30900300000 997.142713900000 1007.04279200000 1010.75180300000 1011.00974400000 1008.16542800000 1003.24316900000 1003.42274700000 1000.31632800000 1009.49489200000 1011.19880800000 1007.23048900000 1000.05682200000 1007.13264700000 1009.40641100000 1013.34435800000 1014.59523900000 1012.99997500000 1002.45651400000 1010.21388600000
1007.63143900000 1013.69220800000 1016.52085600000 1013.28099200000 1005.84439200000 997.479972200000 1007.22611700000 1010.59871900000 1010.82017800000 1007.92970300000 1003.35441900000 1002.36780800000 1000.54393300000 1009.14068600000 1011.02388300000 1007.05475600000 1000.35642800000 1006.99240300000 1009.16368100000 1013.13141400000 1014.49421400000 1012.86652200000 1002.60169400000 1010.12598900000
using:
imagesc(data)
Now I need to normalize each column separately in the following way: finding the maximum value of each column and set it's color, and finding the lowest value of each column and set it's color as well.
So in the end I need a colormap which have the same color for every local maximum and minimum of a column.
I'm quite new to plotting, so I tried looking for normalized colormaps here and on the web, but didn't find anything that can help me.
You're not going to be able to do this strictly with a colormap because the colormap is applied globally to the image and the color used for the local max in one column would be applied to all elements with that value regardless of whether they were the local max of their respective column.
Instead, you can normalize each column of your data and then display that.
%// Subtract off the minimum of each column
D = bsxfun(#minus, data, min(data, [], 1));
%// Divide by the maximum
D = bsxfun(#rdivide, D, max(D, [], 1));
%// Display the result
imagesc(D);

MATLAB - Smart way of reordering the data to show the bell shape?

I have a vector of 810 doubles, which have a very good reason (not relevant, so reason left out here) to roughly follow a Gaussian distribution. I now wish to verify this.
-1425.35483258195
-2005.85887636008
1560.31387221920
422.221432204087
-396.336462872091
1028.04845220438
-126.818743685290
482.602336878657
-351.945829219904
-408.071209112604
-251.839429417447
-1325.82167938863
-1304.65143253464
984.905373772623
-866.213152797951
73.6149979242073
3834.52647065066
917.976216226379
815.189065312880
-96.0747513429396
-319.662630897599
-1221.53710722367
1190.72857085035
2144.87935230603
143.558912788403
-167.475218992091
84.4066585851642
604.944484054070
1509.18911810685
-587.472369780628
143.669853748808
-1412.71275982249
46.2128162171030
-141.952303144073
292.716350945286
-1952.97174976434
-391.978769841029
-573.922085615045
-1301.25783316103
-645.990154917124
-934.774832747395
116.250933690360
544.823087571245
160.470631259077
2602.37582436213
534.434360410673
989.338067269714
-447.272873139365
1118.95219395721
-898.345257943601
-681.176900874247
213.211488587428
-785.169609773158
-430.621935639622
-61.2013695948126
-377.605278281317
1497.99884427522
404.777865468637
-1504.27516707823
-789.565967187437
-1118.50469245357
665.045393010892
28.5870825819056
-1045.44580718356
409.712490593987
-772.727898866153
252.289204820367
-905.257023890462
-300.707805837961
-74.4828651478892
-1087.13018005821
275.455585388661
-947.372403119386
-348.098011249108
1645.59654581296
517.906791768635
322.688565166583
331.939567925477
-612.937714892369
1302.63905136005
-153.606350780020
962.124237023736
-627.507634881584
-226.761116511015
463.132204629023
-939.535480854969
1532.46771710064
222.343444164121
303.799291944722
1084.75952392675
856.849727349139
514.671849059982
-1655.41677124587
-127.246214481867
1734.57538636725
56.2555496894129
297.184996955808
386.823038887674
1353.32907458661
-2307.42128989437
654.140638203676
-1392.55190147038
-607.378457188426
2384.44806882885
2293.43321702051
47.3551805244424
746.478352537506
-938.994569192230
192.721071163348
-4.29989698278951
100.289121179456
812.825042468773
103.758682367813
-490.446548621378
-1339.81881565035
-595.379417250646
499.458821146142
765.412270843621
532.095358987890
-247.000541594816
-480.064780362965
316.263039414615
449.159830642379
1933.73501675200
52.4933985187945
3107.07754310984
218.560847122495
-575.905775870265
2124.73813469493
1272.05488997025
-777.848735713576
-1981.23363300488
-1677.42292095700
605.970193322080
-759.457775207884
-84.6880200736514
-825.486129072864
739.859927410010
781.960329365344
-77.4149957958771
57.2191392940895
-500.299306284041
-575.933520504403
-1402.37563293800
-164.380079314064
232.496199533151
-1150.91949913415
-76.7244722653677
-47.1854688325975
3140.15003755460
-1330.34731058125
145.959328309073
1600.84592274169
-24.9232437067194
1395.72597116652
1621.21780908032
85.7934267467826
3279.93389739169
1516.36196103567
-1039.08123306694
-26.8801938594925
1492.40185616989
2445.00749952465
356.999233644735
962.558708481810
52.1166636462876
-180.338443931614
1135.86865368933
-823.056149900716
513.081279614810
1632.55462408653
700.098711621567
-1004.01052033257
838.798263982723
49.8997525149898
55.7119287736441
70.2170006303140
1694.63693249428
340.232240670027
-785.266479583255
-1490.75705865048
907.610252998604
-338.053785111386
-158.302237129483
810.050487377534
357.250435108372
-963.243345806145
-514.816899574995
-110.692584354545
-523.919862464934
1179.10220528566
-707.786358763919
-744.020374418825
-184.772566675096
1048.29906053004
291.212627519886
-1699.41811637976
1169.44527009486
-981.678801748923
-1003.40713607552
380.192537521396
-246.707457668937
550.802388031726
-537.288326878588
-1909.14320854900
334.084003654602
1315.91990144012
-87.7648557606226
484.711537732028
473.487768459009
-348.920356370175
1290.48676735822
128.895752577464
-463.231949345272
-461.975905174972
-1960.31200780286
-463.066933400454
636.123377337945
-457.893970268988
-886.605181442714
1288.19479205883
1534.45512372237
358.985063025987
-528.812332235894
-853.054006933991
-470.516697933259
75.7814123333455
922.488730629832
-607.322778020469
-1168.32280143675
-1164.49270789924
1144.46795817114
237.919069158304
464.605144587411
-1779.15853404145
-687.068044606544
-1558.76542615201
1122.67865170534
147.377599700542
-1941.99704382516
-197.265704116704
771.418343613877
617.611707163922
-184.024688145049
-630.977365935732
-1449.60039078064
-2031.87254125474
339.115574107012
507.110373028804
-35.3207932025325
-226.486793234861
-1151.56599554854
-1626.99321244231
137.738574478250
753.742389575134
254.480213830903
-299.494668002752
-464.217408373797
-496.881983902247
124.175797483519
641.036273039545
-875.645225304455
-850.013624134959
-1109.89290174708
-1564.11183301231
-697.565976576565
1033.07113738597
51.6226154312835
771.394497917418
942.389088995320
1196.05347790507
-678.014674370847
-1166.17784824523
-999.823651819537
401.157806208508
-477.448061210651
-73.4660915645727
354.733942551547
-431.951507899472
1318.88051933731
344.338765880639
598.804769543009
-1248.79480727276
858.421109550656
-556.899467429002
1807.63182070400
-159.136636488214
1799.22265828335
-240.692257347021
-1220.72830688348
74.1221061405495
-1640.11048850379
572.382227723556
94.5360732832287
-605.392031424351
-1493.66630795796
2797.18192240374
1616.53036000672
572.718159305989
-2204.37593002237
-322.774296955364
-430.000508898373
-104.048115418703
-1087.07923450010
-144.392429036394
-32.6087990828473
814.526216253877
-942.330594442485
561.790955470880
-919.551937169830
-637.665692814220
-27.5056243422514
-53.4289661228959
-349.487021035242
1254.06511966928
-1084.45861311495
2229.81290397501
-61.7348956711430
2315.31893617308
-905.051392195664
-330.066447009382
667.731590154659
2362.88627865678
-134.122103628698
-998.406485815768
3412.50099946158
1738.40741493709
-1435.63471165575
279.643055725084
-1080.07001067794
1038.67436238825
-59.5107168975392
-428.623061940542
90.9674755392625
428.864025012534
461.053414725420
76.7429752580429
-1047.74156835217
-1138.74437265796
-274.421370192137
-123.113141820210
1062.88624964445
-31.2932925583336
-47.2386460915968
566.285925381789
-162.476912673828
-579.149923138140
-1645.39762646152
-0.858506362164007
-1388.80667204739
-1611.24592897178
791.558877147674
-866.957703178365
-670.383595544925
-274.315832321348
832.836094551398
167.966896050509
-795.723924812035
-463.256974967680
1774.72662476188
565.080479736877
-567.419721200751
-1293.18551532982
-102.106516298420
-1023.45366146646
342.686949749701
-1943.95971161213
-1242.88726281114
-363.843860974623
218.911330607643
-1299.25729831318
1801.62607745420
485.598606188077
-209.745413876955
824.225434162006
80.4120792716949
-1101.71843965055
-489.648697328510
515.844053843147
921.482043018526
-1007.19911926667
892.329352367407
-206.559385161153
1289.34370927758
132.875816484038
-693.868519040030
1238.26425299907
-1029.59553086535
-1045.03807191815
684.486795552311
1156.78869170002
503.287695641337
-1761.08210583943
1504.49354570708
-2.38904808358893
-891.872139762875
-471.810563237261
-357.989880589008
1237.27821337192
-1118.74885097858
-1664.34130366938
-707.692351910793
-179.392901121722
2.51492953811066
1283.18737455847
-621.389601400035
-142.879999439187
409.670524550240
-1520.69976017121
-945.049848553859
-508.792922740967
-1013.16358819067
1333.23041683582
-485.612620083036
633.086691051391
974.147758083274
-1482.92064521016
170.457510166752
-319.276155374235
-102.475737807179
-806.147249075137
12.2710130392989
-1284.51556919452
-898.153118894255
-1264.39247941500
310.518406626345
300.653823915844
771.414870652903
-443.317509228219
-217.820334710797
-568.546664318710
1221.84294901066
406.621006399999
1536.40526591371
-88.1133675293550
-423.424777451501
911.889602982767
-561.496263588238
271.138351172729
-853.973387287833
-919.890778546460
29.2848487526380
515.153053644342
916.906990841340
-988.795430988675
-2288.39552282448
-354.278819283692
727.755387319324
-438.729779965080
-460.743800289783
498.419836651718
-1016.52550793176
1719.96686296631
1378.78460794700
-74.1662909720290
-794.313252330921
-579.575585572261
1032.38039003017
-139.352044190169
-921.411154727281
-632.436686005542
511.937665864214
-465.867561162771
682.753565100946
-837.343300398131
-203.807199334120
697.210075868778
383.665875798750
-285.949563188691
473.458597852185
-1074.35861318824
-1397.97178609897
-1003.88094273428
711.645485233387
980.242460658460
-528.721307121879
105.957921554011
-688.634132580983
-1639.86682075114
-1477.62683757162
462.025696610903
398.670153266179
-553.384968966910
625.057323419982
1002.74945530885
493.980588087071
738.959303162354
-1262.67475377973
-572.177811667752
308.236783523600
-406.525047730467
-279.064813326399
-958.715002126351
667.070145627578
101.287176877154
1029.77737241096
884.572701132805
-83.2129981675607
436.454402083900
-731.784460332883
-828.152649525027
-4.59039366284560
1173.27675925715
947.875960433114
219.825903925695
-1348.62640205386
1416.03397544099
-867.559504844558
-921.730092961659
-594.959474993817
-578.601607691280
1713.94162285846
-890.538205788453
-31.1520768075825
-840.083103895247
271.138757797886
30.4852851688702
1077.87779754491
1027.97848743209
-1216.23657331206
718.721023399901
1168.72555297803
-1126.29889111422
-38.0485352514261
559.324906271146
143.737128536855
-520.823282690490
-421.404810071988
-879.950358622646
383.976795499795
431.651954748570
-1014.23132627610
791.227060578848
-446.251570984076
-880.263297275125
249.601560953378
598.668996636698
-850.966552797904
-755.673152069518
572.459612333701
177.692884397484
600.926582295822
1188.77012356426
-691.839959588951
-502.690126011454
25.3399035825159
-520.840003827040
-1012.71789390801
389.607229075335
2336.37944482949
4601.28549891861
-306.109062155709
-549.754157876436
1366.49195319864
80.1658288538984
-371.898746055809
221.220689352235
-1034.26423624067
-227.175386588575
456.976283321366
-893.331715773963
1139.45199359176
-426.972252590305
125.689745639213
-755.291604557464
906.715046470356
-512.375090745554
-183.436523634227
-1271.17935524883
343.944597498092
357.375062083205
503.360088312412
-1063.47172123093
-544.151922949868
-811.465116940168
-382.518818090521
-556.364297944514
28.4462104060804
-391.469958695141
702.920945890725
3276.75393467650
-1601.46189476513
215.094152272832
1289.65287462539
-266.279004487831
-359.857620157932
770.042919144449
984.724775247226
-124.345016575689
-479.520031553426
-477.614657604774
-88.1973812779706
112.358632460992
-1213.83458979284
-2164.47382612438
68.3193891329520
-881.771368628023
169.849935188382
988.964748477654
158.420971886695
199.625846049925
-532.329781433098
-35.8791437174177
1327.24414199818
562.056024879379
-476.849700670497
221.935429478316
1563.51220970406
-799.111728532053
451.956789308570
-271.333350632898
637.294349346712
1842.67665511535
1462.24940915688
632.600524370893
-400.567297177738
-423.141178019932
-599.578935046919
1631.33084732187
1274.89043581579
417.304963875531
-1671.85306193716
-875.134111594071
-888.175742491925
781.420136563384
-267.891345155953
-984.747911033292
619.692042477853
507.097508348636
-2191.61648965449
871.941679622509
354.805731581013
-813.842611493990
-797.177241995762
-963.636395691701
69.1304461321361
-504.047776578296
2120.31188847033
-972.664353788443
1635.59419926198
813.341563425280
556.176646947061
853.969583042162
-340.944807273296
1860.51180529648
164.584505357234
2416.65258964103
453.392895539603
-598.129522562993
-436.423805800641
-1073.09763119235
818.515189790920
915.328394918082
-844.856562790346
-151.573550264624
188.640708868880
662.302131098894
599.417211331797
625.005959399488
-712.457731270164
-456.930434881017
430.006802672571
432.201988090676
-1805.76017728314
-765.777546844394
-366.775473893042
-1390.36840812369
-115.821548189160
-348.024152316248
-2081.96568815380
-1270.09386919888
590.375306666686
-1425.53765935045
3082.54680185326
127.134922589132
-64.8286220730133
1030.02663234355
814.903512139286
209.749857774112
-195.505605537004
-627.329338981148
-1312.39013357494
171.133025716999
1247.87792775840
-519.610915373372
2112.46320371606
9.32989625287883
165.878608899171
-1271.10665412487
-993.973494489265
2.05541319826716
-659.015889529154
1013.38348492602
719.325793086795
-533.063499513220
-120.770138644812
582.042029894734
-2453.18073103871
-480.093187602034
-947.472900692303
661.481266970943
2091.75056688107
264.617458558831
688.572625188444
-553.727400183363
1854.09100161690
-584.441964107862
160.859971291589
-721.797012172758
530.747141338406
-440.327138191801
110.306408202837
-1383.45033522105
-2165.65821622627
771.596558585712
168.287995174270
873.750929372014
-899.896768600454
826.404866814517
-954.055096167494
24.5476499542792
-1035.13149902373
242.010718795495
817.365138698160
-191.375310710834
1026.53362477036
1506.65413148945
-527.047853871006
-301.653867464794
-906.675209444651
-1.35693695415011
-1361.35311995217
-1055.16027830381
1835.99350558714
-153.771963586896
-1024.20571742302
-7.52437658966574
-199.706148737951
-55.6970184322190
358.588943940760
750.748910025249
-130.369658412103
115.801978429215
-362.228245710698
1072.90727368639
285.144147030216
275.476205540914
-425.410694245723
-358.251651764280
54.5762606959333
-986.393501781955
1987.82942003996
-119.612618624157
4088.87885652650
-46.4155713632708
855.384197547839
348.442497861890
-638.248417658654
1464.23877404674
1958.52428386456
102.248039598800
-111.573563229895
-485.111192525760
-766.212536691707
-2000.03833099073
-1256.32241772728
-42.4379799861126
664.131166310975
-801.923373300931
-983.323933269528
1648.18557989817
387.963306334943
-1569.93080059318
222.937758757887
-114.704995616332
-390.835557576743
-583.648071221651
898.816929040312
-1430.89073677080
485.974041322305
-546.204265548018
-928.957012051962
857.876890609405
275.037960659607
-984.994405754642
-2584.59906037955
-1238.24519741587
2252.11593175793
-615.096425393547
-1441.41851657964
1852.82338381085
-794.909638822273
-1724.84781684101
-837.605831849087
242.111467511679
-1348.52499237212
1575.34223230675
-1400.44850343094
2640.09986069654
-1216.91897365897
-861.181602306838
264.540049874899
722.940025618886
394.150610960769
-918.913133715832
-448.520560840232
169.730666854386
-553.694315285847
-389.285749031319
1917.29156813389
Since the vector is not ordered, directly plotting them in current order gives a messy plot like this.
What is a smart way of easily reordering the data so that I can verify whether they roughly follow a normal distribution or not?
To see if your data follow a Gaussian distribution you can use normplot. It draws the empirical distribution function of the data on a scale such that a Gaussian corresponds to a straight line. The more straight the line is, the more similar to a Gaussian.
If often happens that the curve is straight in the central part, and deviates on its ends. That's the case with your data; see figure below.
The explanation is that the Gaussian distribution usually arises from a sum of random variables, by virtue of the Central Limit Theorem. The distribution of the sum is Gaussian in the limit as the number of summands tends to infinity. For a finite number of terms the distribution is only approximately Gaussian; and the approximation is better at the center than on the tails (in fact, that's why the theorem is called central).
If you have the Statistics Toolbox, you could also run one of the hypothesis tests, like the Jarque-Bera Test, which will tell you (within a confidence limit) how likely it is that your points were drawn from a normal distribution.
[h, p] = jbtest(X, 0.05);
if h
disp(sprintf('There is less than %.3f%% chance that your data is abnormal', 100 * p));
else
disp(sprintf('Your data is not normal within your confidence limit'));
end
This doesn't give you a pretty plot, but it will give you a less biased answer than just eyeballing it.
In this case, there is better than 99.9% chance that your data set was drawn from a normal distribution.
Simply use the histogram function:
histogram(X)
To view the PDF you can use:
if exist('histogram','func')
histogram(data)
else
hist(data)
end
This looks pretty normal to me. You can always try modeling it with a gaussian.

I want to make one period representative signal from signal train in MATLAB

I'd like to make one period representative signal.
There are several signals in different periods.
I don't want to cut one period signal from several signals.
How can I solve this problem in matlab?
Below is the signal data values.
Thank you.
57.2336830000000
57.1587480000000
57.1025470000000
109.144632000000
110.081315000000
110.886862000000
111.580007000000
112.104549000000
112.497956000000
112.797694000000
112.947564000000
113.097433000000
113.134900000000
113.097433000000
113.022498000000
112.872629000000
112.629092000000
112.291886000000
111.917213000000
111.486339000000
110.980530000000
110.455988000000
109.856511000000
109.125899000000
108.357819000000
107.477337000000
106.559388000000
105.547771000000
104.536154000000
103.449602000000
102.344316000000
101.239031000000
100.189947000000
99.1221280000000
98.1479780000000
97.2112960000000
96.3120810000000
95.5440010000000
94.8321220000000
94.1951780000000
93.6331680000000
93.2022940000000
92.7714200000000
92.4342150000000
92.1532100000000
91.8909390000000
91.6848690000000
91.5349990000000
91.4038640000000
91.2539950000000
91.1603260000000
91.0666580000000
90.9729900000000
90.8231210000000
90.7669200000000
90.6357840000000
90.5421160000000
90.4297140000000
90.3173120000000
90.1487090000000
90.0175740000000
89.8302370000000
89.6991020000000
89.5117650000000
89.3244290000000
89.1370920000000
88.9497560000000
88.7249520000000
88.5376150000000
88.3315450000000
88.1442090000000
87.9381380000000
87.7320680000000
87.5072640000000
87.2824610000000
87.0763900000000
86.8515870000000
86.6267830000000
86.3645120000000
86.1584410000000
85.8961700000000
85.6713670000000
85.4278290000000
85.2217590000000
84.9782210000000
84.7346840000000
84.5098800000000
84.2663430000000
84.0977400000000
83.8916700000000
83.6668660000000
83.4795290000000
83.2547250000000
83.1048560000000
82.9175200000000
82.7301830000000
82.5615800000000
82.3742440000000
82.1869070000000
82.0557720000000
81.9059030000000
81.7373000000000
81.5874310000000
81.4375610000000
81.2689580000000
81.1940240000000
81.0441550000000
80.9317530000000
80.8006170000000
80.6882150000000
80.5383460000000
80.4259440000000
80.3135420000000
80.1636730000000
80.1262060000000
79.9763360000000
79.9014020000000
79.7702660000000
79.6578640000000
79.5641960000000
79.4705280000000
79.3393920000000
79.2644580000000
79.1333220000000
79.0396540000000
78.9459860000000
78.8148500000000
78.7024480000000
78.6087800000000
78.4963780000000
78.3839760000000
78.2528410000000
78.1779060000000
78.0467700000000
77.9531020000000
77.8594340000000
77.7282980000000
77.6533640000000
77.5222280000000
77.3910930000000
77.3348920000000
77.1475550000000
77.0538870000000
76.8852840000000
76.8103490000000
76.6230130000000
76.4731440000000
76.3045410000000
76.1546720000000
75.9860690000000
75.8361990000000
75.6488630000000
75.4802600000000
75.3491250000000
75.1430540000000
75.0119190000000
74.8245820000000
74.6934470000000
74.4873770000000
74.3749750000000
74.2063720000000
74.0565030000000
73.9253670000000
73.8316990000000
73.7192970000000
73.6068950000000
73.5506940000000
73.4757590000000
73.4757590000000
73.5132270000000
73.6068950000000
73.7942310000000
74.0565030000000
74.4311760000000
74.9931850000000
75.6301290000000
76.4544100000000
77.4660270000000
78.6275140000000
79.9763360000000
81.4562950000000
83.0861230000000
84.8658200000000
86.7204510000000
88.7249520000000
90.7107190000000
92.7339530000000
94.7946550000000
96.7991560000000
98.7099880000000
100.545886000000
102.250648000000
103.786808000000
105.210565000000
106.409519000000
107.496071000000
108.395286000000
109.182100000000
109.762843000000
110.231184000000
110.605857000000
110.830661000000
110.961797000000
111.055465000000
111.017997000000
110.905596000000
110.755726000000
110.530923000000
110.212450000000
109.893978000000
109.500572000000
109.013497000000
108.470221000000
107.852010000000
107.158865000000
106.372052000000
105.510304000000
104.611088000000
103.655672000000
102.644055000000
101.576237000000
100.489685000000
99.4780680000000
98.3915160000000
97.3424310000000
96.3308140000000
95.4128650000000
94.5136500000000
93.7081030000000
92.9962240000000
92.3405460000000
91.7410700000000
91.2165270000000
90.7856530000000
90.4297140000000
90.1112420000000
89.8489710000000
89.6616340000000
89.3993630000000
89.2869610000000
89.1558260000000
89.0434240000000
88.9684890000000
88.8560870000000
88.7811530000000
88.7062180000000
88.6125500000000
88.5001480000000
88.4252130000000
88.2940780000000
88.1629420000000
88.0692740000000
87.8819370000000
87.7695350000000
87.6009330000000
87.3948620000000
87.2449930000000
87.0389230000000
86.8515870000000
86.6267830000000
86.4207130000000
86.2146420000000
86.0085720000000
85.8025020000000
85.5589650000000
85.3903620000000
85.1468240000000
84.9220200000000
84.6784830000000
84.4349460000000
84.2288750000000
84.0602730000000
83.7792680000000
83.5544640000000
83.3483940000000
83.1423240000000
82.8987860000000
82.7301830000000
82.5241130000000
82.3367770000000
82.1494400000000
81.9433700000000
81.7747670000000
81.6061640000000
81.4375610000000
81.2689580000000
81.1190890000000
80.9504860000000
80.8193510000000
80.6507480000000
80.5196120000000
80.3697430000000
80.2760750000000
80.1074720000000
79.9763360000000
79.8452010000000
79.6953320000000
79.5829300000000
79.4330610000000
79.3206590000000
79.1895230000000
79.0396540000000
78.9085180000000
78.7399150000000
78.5900460000000
78.4589110000000
78.3090410000000
78.1966400000000
78.0467700000000
77.9531020000000
77.8219670000000
77.7095650000000
77.5971630000000
77.4660270000000
77.3910930000000
77.2412230000000
77.1475550000000
77.0726200000000
76.9602190000000
76.8665500000000
76.7541480000000
76.6417460000000
76.5668120000000
76.4731440000000
76.3794750000000
76.2858070000000
76.2108720000000
76.0984710000000
76.0048020000000
75.8736670000000
75.8174660000000
75.7050640000000
75.5926620000000
75.4802600000000
75.3678580000000
75.2554560000000
75.1430540000000
74.9744510000000
74.8620500000000
74.6934470000000
74.5623110000000
74.4124420000000
74.2438390000000
74.0752360000000
73.9253670000000
73.7754980000000
73.5881610000000
73.4008250000000
73.2509560000000
73.0448850000000
72.8575490000000
72.7638810000000
72.5952780000000
72.4454080000000
72.3142730000000
72.2018710000000
72.1269360000000
72.0332680000000
71.9396000000000
71.9021330000000
71.9396000000000
71.9396000000000
72.0332680000000
72.1831370000000
72.4266750000000
72.7076800000000
73.1760210000000
73.7567640000000
74.4124420000000
75.3116570000000
76.3420080000000
77.5222280000000
78.8710510000000
80.3697430000000
82.0183040000000
83.7980010000000
85.6526330000000
87.5634650000000
89.5304990000000
91.5162660000000
93.4645660000000
95.3566640000000
97.1363610000000
98.9160580000000
100.452218000000
101.913442000000
103.206064000000
104.311350000000
105.304233000000
106.128514000000
106.802926000000
107.346202000000
107.777076000000
108.076814000000
108.282884000000
108.357819000000
108.395286000000
108.301618000000
108.114281000000
107.926945000000
107.627206000000
107.233800000000
106.802926000000
106.315851000000
105.772575000000
105.116897000000
104.405018000000
103.580738000000
102.775190000000
101.838508000000
100.864358000000
99.8527410000000
98.8036560000000
97.7358380000000
96.7054870000000
95.6376690000000
94.6073180000000
93.6144350000000
92.6964860000000
91.8347380000000
91.0479250000000
90.3735130000000
89.7365690000000
89.2120270000000
88.7249520000000
88.3315450000000
87.9943390000000
87.7508020000000
87.5447320000000
87.3948620000000
87.2637270000000
87.1513250000000
87.1138580000000
87.0201890000000
86.9639880000000
86.9077880000000
86.8703200000000
86.8141190000000
86.7391850000000
86.7017170000000
86.6267830000000
86.5143810000000
86.4207130000000
86.3457780000000
86.1959090000000
86.0460400000000
85.9336380000000
85.7650350000000
85.5964320000000
85.4090950000000
85.2217590000000
85.0344220000000
84.8470860000000
84.6222820000000
84.3974780000000
84.1726740000000
83.9478710000000
83.7792680000000
83.5357300000000
83.3109260000000
83.0861230000000
82.8987860000000
82.6927160000000
82.5053790000000
82.2993090000000
82.0745050000000
81.8871690000000
81.7373000000000
81.5312300000000
81.3626270000000
81.1752900000000
81.0066870000000
80.8380840000000
80.7069490000000
80.5383460000000
80.4072100000000
80.2386080000000
80.1074720000000
79.9950700000000
79.8452010000000
79.6765980000000
79.5454620000000
79.4330610000000
79.3019250000000
79.2082570000000
79.1145890000000
78.9647190000000
78.8897850000000
78.7773830000000
78.7211820000000
78.6275140000000
78.5338450000000
78.4401770000000
78.3277750000000
78.2715740000000
78.1779060000000
78.0655040000000
77.9905690000000
77.8969010000000
77.8032330000000
77.7095650000000
77.5971630000000
77.4847610000000
77.4098260000000
77.3161580000000
77.2599570000000
77.1475550000000
77.0351530000000
76.9789520000000
76.8852840000000
76.8103490000000
76.7166810000000
76.6042790000000
76.5668120000000
76.4544100000000
76.3794750000000
76.2670730000000
76.1734050000000
76.0797370000000
76.0422700000000
75.9111340000000
75.8549330000000
75.7799990000000
75.6675970000000
75.5364610000000
75.4240590000000
75.3303910000000
75.1430540000000
75.0306520000000
74.8807830000000
74.7121800000000
74.5623110000000
74.4124420000000
74.2438390000000
74.0565030000000
73.9066330000000
73.7005630000000
73.5694280000000
73.4008250000000
73.2322220000000
73.0823530000000
72.8950160000000
72.7638810000000
72.6327450000000
72.5203430000000
72.3892080000000
72.2955390000000
72.2393380000000
72.1456700000000
72.1831370000000
72.2393380000000
72.2955390000000
72.4454080000000
72.6889460000000
73.0636190000000
73.5319600000000
74.1689040000000
74.9557180000000
75.8736670000000
76.9602190000000
78.1966400000000
79.6016630000000
81.1565570000000
82.8238520000000
84.6035480000000
86.4769140000000
88.3690120000000
90.3360460000000
92.2843460000000
94.1951780000000
96.0685430000000
97.8295060000000
99.4968010000000
100.976760000000
102.400517000000
103.618205000000
104.704757000000
105.622706000000
106.409519000000
107.027729000000
107.533538000000
107.908211000000
108.189216000000
108.357819000000
108.432753000000
108.414020000000
108.339085000000
108.207950000000
108.039347000000
107.720875000000
107.421136000000
107.046463000000
106.615589000000
106.128514000000
105.510304000000
104.910827000000
104.180214000000
103.393401000000
102.531653000000
101.632438000000
100.677021000000
99.6654040000000
98.6537870000000
97.6234360000000
96.6305530000000
95.6376690000000
94.7009870000000
93.8017710000000
92.9962240000000
92.2468780000000
91.5349990000000
90.9917240000000
90.4484480000000
89.9988400000000
89.6803680000000
89.3618960000000
89.0996250000000
88.8935550000000
88.7624190000000
88.6125500000000
88.5563490000000
88.5188820000000
88.4252130000000
88.3690120000000
88.3502790000000
88.2940780000000
88.2191430000000
88.1442090000000
88.0505400000000
87.9756060000000
87.8632040000000
87.7695350000000
87.6196660000000
87.5072640000000
87.3573950000000
87.2262600000000
87.0389230000000
86.8703200000000
86.6642500000000
86.4769140000000
86.2895770000000
86.1022410000000
85.8961700000000
85.6901000000000
85.5027640000000
85.2966940000000
85.0906230000000
84.9032870000000
84.6784830000000
84.4349460000000
84.2663430000000
84.0602730000000
83.8729360000000
83.6481320000000
83.4607960000000
83.2547250000000
83.0673890000000
82.9175200000000
82.7301830000000
82.5428470000000
82.3929780000000
82.2431080000000
82.0745050000000
81.9433700000000
81.7747670000000
81.6436310000000
81.5124960000000
81.3813600000000
81.3064260000000
81.1565570000000
81.0628880000000
80.9692200000000
80.8755520000000
80.8006170000000
80.7256830000000
80.6320140000000
80.5570800000000
80.4446780000000
80.3884770000000
80.3135420000000
80.2386080000000
80.1636730000000
80.1449390000000
80.0325370000000
79.9950700000000
79.8826680000000
79.8639350000000
79.7890000000000
79.7327990000000
79.6578640000000
79.5641960000000
79.5267290000000
79.4330610000000
79.3581260000000
79.3019250000000
79.1895230000000
79.0771210000000
79.0021870000000
78.9272520000000
78.8335840000000
78.7211820000000
78.6462470000000
78.5525790000000
78.4589110000000
78.3839760000000
78.3090410000000
78.2341070000000
78.1591720000000
78.0655040000000
77.9718360000000
77.8594340000000
77.8219670000000
77.7095650000000
77.5971630000000
77.4660270000000
77.3536250000000
77.2599570000000
77.1288210000000
76.9976860000000
76.8478170000000
76.6979470000000
76.5668120000000
76.4169430000000
76.2483400000000
76.0984710000000
75.9673350000000
75.7987320000000
75.6675970000000
75.5177270000000
75.4053250000000
75.2554560000000
75.1617880000000
75.0681200000000
74.9744510000000
74.9182510000000
74.8433160000000
74.8433160000000
74.8620500000000
74.9557180000000
75.0681200000000
75.2554560000000
75.6113960000000
76.0048020000000
76.5480780000000
77.2037560000000
78.0655040000000
79.0583880000000
80.1824070000000
81.5312300000000
83.0111880000000
84.6784830000000
86.3832450000000
88.2191430000000
90.1487090000000
92.1719440000000
94.1764440000000
96.1809450000000
98.1292450000000
100.040077000000
101.819774000000
103.505803000000
105.023229000000
106.372052000000
107.589739000000
108.657557000000
109.575506000000
110.306119000000
110.961797000000
111.430138000000
111.804811000000
112.067082000000
112.216951000000
112.291886000000
112.291886000000
112.216951000000
112.067082000000
111.898479000000
111.617474000000
111.299002000000
110.943063000000
110.455988000000
109.968913000000
109.388170000000
108.732492000000
108.020613000000
107.233800000000
106.334584000000
105.416635000000
104.442485000000
103.430868000000
102.400517000000
101.332699000000
100.264881000000
99.2532640000000
98.2603800000000
97.3049640000000
96.3870150000000
95.5814680000000
94.8508560000000
94.1577110000000
93.5769670000000
93.0524250000000
92.6028180000000
92.1906770000000
91.9096720000000
91.6474010000000
91.4225980000000
91.2352610000000
91.1041250000000
90.9917240000000
90.9355230000000
90.8231210000000
90.7669200000000
90.7294520000000
90.6732510000000
90.5983170000000
90.5608500000000
90.4671810000000
90.3735130000000
90.2798450000000
90.1674430000000
90.0175740000000
89.9051720000000
89.7553030000000
89.5492320000000
89.3993630000000
89.2120270000000
89.0246900000000
88.8560870000000
88.6125500000000
88.4064800000000
88.2191430000000
87.9943390000000
87.8070030000000
87.5821990000000
87.3761290000000
87.1700590000000
86.9639880000000
86.7579180000000
86.5143810000000
86.3270440000000
86.0835070000000
85.8774370000000
85.6713670000000
85.4652960000000
85.2779600000000
85.0718900000000
84.8658200000000
84.7159500000000
84.5098800000000
84.3412770000000
84.1726740000000
84.0415390000000
83.8916700000000
83.7418000000000
83.6106650000000
83.5169970000000
83.4045950000000
83.3109260000000
83.1985250000000
83.1048560000000
83.0299220000000
82.9362530000000
82.8051180000000
82.7676510000000
82.6552490000000
82.5615800000000
82.4491780000000
82.3929780000000
82.2618420000000
82.1869070000000
82.0932390000000
81.9808370000000
81.8684350000000
81.7560330000000
81.6623650000000
81.4750290000000
81.4000940000000
81.2502250000000
81.1378230000000
81.0628880000000
80.9130190000000
80.8006170000000
80.7069490000000
80.5945470000000
80.4821450000000
80.3697430000000
80.2760750000000
80.1824070000000
80.0700050000000
79.9763360000000
79.9014020000000
79.8077340000000
79.7515330000000
79.6953320000000
79.6016630000000
79.5454620000000
79.4330610000000
79.3955930000000
79.3393920000000
79.3019250000000
79.2457240000000
79.1707890000000
79.1333220000000
79.0958550000000
79.0021870000000
78.9647190000000
78.9085180000000
78.8710510000000
78.7961160000000
78.7024480000000
78.6275140000000
78.5900460000000
78.4776440000000
78.3652420000000
78.2903080000000
78.1591720000000
78.0467700000000
77.9531020000000
77.7657660000000
77.6908310000000
77.5409620000000
77.3910930000000
77.2412230000000
77.1100880000000
77.0164200000000
76.8290830000000
76.6792140000000
76.5293450000000
76.4356760000000
76.3420080000000
76.2108720000000
76.1359380000000
76.0235360000000
75.9111340000000
75.8736670000000
75.8549330000000
75.8924000000000
75.9298680000000
76.0984710000000
76.3232740000000
76.6417460000000
77.1475550000000
77.7470320000000
78.5900460000000
79.5267290000000
80.6320140000000
81.9433700000000
83.4233280000000
85.0344220000000
86.8141190000000
88.6500170000000
90.6919850000000
92.7152190000000
94.8133880000000
96.9115570000000
98.9909930000000
100.995494000000
102.925060000000
104.779691000000
106.446986000000
108.001879000000
109.406903000000
110.680792000000
111.711143000000
112.629092000000
113.378438000000
113.996648000000
114.502457000000
114.895864000000
115.139401000000
115.308004000000
115.364205000000
115.364205000000
115.270537000000
115.120667000000
114.933331000000
114.671060000000
114.296387000000
113.865513000000
113.359704000000
112.816428000000
112.216951000000
111.486339000000
110.718259000000
109.856511000000
108.976029000000
108.001879000000
106.990262000000
105.941178000000
104.910827000000
103.843009000000
102.775190000000
101.782307000000
100.789423000000
99.8902080000000
98.9909930000000
98.2416470000000
97.4923010000000
96.8178890000000
96.2558800000000
95.7500710000000
95.2817300000000
94.8695890000000
94.6073180000000
94.3263140000000
94.1202430000000
93.9516400000000
93.8017710000000
93.6893690000000
93.6144350000000
93.4832990000000
93.4083650000000
93.3334300000000
93.2210280000000
93.1273600000000
92.9962240000000
92.8838220000000
92.6964860000000
92.5466170000000
92.3405460000000
92.1532100000000
91.9284060000000
91.6848690000000
91.4225980000000
91.1790600000000
90.8980550000000
90.5983170000000
90.3735130000000
90.0925080000000
89.8115040000000
89.5117650000000
89.2494940000000
88.9497560000000
88.7062180000000
88.4252130000000
88.1629420000000
87.8819370000000
87.6196660000000
87.3573950000000
87.1138580000000
86.8515870000000
86.6080490000000
86.3832450000000
86.1209740000000
85.9149040000000
85.6526330000000
85.4278290000000
85.2404930000000
84.9969550000000
84.7721510000000
84.5660810000000
84.3787450000000
84.1726740000000
84.0040720000000
83.8354690000000
83.6481320000000
83.4982630000000
83.3296600000000
83.1235900000000
82.9924540000000
82.8425850000000
82.6739820000000
82.5428470000000
82.4117110000000
82.2805760000000
82.1681740000000
82.0183040000000
81.9059030000000
81.7747670000000
81.6810990000000
81.5874310000000
81.4750290000000
81.3813600000000
81.2689580000000
81.1940240000000
81.0816220000000
81.0066870000000
80.9317530000000
80.8568180000000
80.7631500000000
80.6882150000000
80.5945470000000
80.5570800000000
80.4634110000000
80.4072100000000
80.3322760000000
80.2573410000000
80.2011400000000
80.0887380000000
80.0138040000000
79.9201360000000
79.8452010000000
79.6953320000000
79.6203970000000
79.5267290000000
79.3581260000000
79.2269900000000
79.0583880000000
78.9272520000000
78.7586490000000
78.5713130000000
78.4027100000000
78.2528410000000
78.0467700000000
77.8594340000000
77.7095650000000
77.5409620000000
77.3536250000000
77.1850220000000
77.0351530000000
76.8665500000000
76.7166810000000
76.5855460000000
76.3982090000000
76.2858070000000
76.1921390000000
76.0797370000000
76.0235360000000
75.9486010000000
75.8924000000000
75.9111340000000
75.9486010000000
76.0048020000000
76.1546720000000
76.3794750000000
76.7354150000000
77.1475550000000
77.6720970000000
78.3652420000000
79.2269900000000
80.2011400000000
81.3064260000000
82.6177810000000
84.0228050000000
85.5776980000000
87.1887920000000
88.9497560000000
90.7481860000000
92.6028180000000
94.4574490000000
96.2933470000000
98.0543100000000
99.7403390000000
101.351433000000
102.793924000000
104.180214000000
105.341701000000
106.409519000000
107.308734000000
108.133015000000
108.732492000000
109.238300000000
109.631707000000
109.950179000000
110.081315000000
110.193717000000
110.193717000000
110.118782000000
109.950179000000
109.725375000000
109.500572000000
109.088431000000
108.676291000000
108.264151000000
107.645940000000
106.990262000000
106.240916000000
105.454103000000
104.592355000000
103.636938000000
102.662789000000
101.576237000000
100.583353000000
99.4780680000000
98.4289830000000
97.3798990000000
96.3682820000000
95.4128650000000
94.5136500000000
93.6893690000000
92.9400230000000
92.2843460000000
91.6661350000000
91.1228590000000
90.6919850000000
90.3360460000000
90.0550410000000
89.7927700000000
89.6054330000000
89.4368300000000
89.3244290000000
89.2307600000000
89.1558260000000
89.1183580000000
89.0808910000000
89.0246900000000
88.9684890000000
88.9122880000000
88.8373540000000
88.7436850000000
88.6500170000000
88.5188820000000
88.3690120000000
88.2191430000000
88.0505400000000
87.8819370000000
87.6758670000000
87.4697970000000
87.2449930000000
87.0201890000000
86.7953860000000
86.5518480000000
86.3270440000000
86.0273060000000
85.7837680000000
85.5027640000000
85.2404930000000
84.9969550000000
84.7159500000000
84.4724130000000
84.2476090000000
84.0040720000000
83.7605340000000
83.5169970000000
83.2921930000000
83.0673890000000
82.8987860000000
82.6739820000000
82.5053790000000
82.3180430000000
82.1119730000000
81.9246360000000
81.7747670000000
81.6061640000000
81.5124960000000
81.3438930000000
81.1565570000000
81.0628880000000
80.9317530000000
80.7631500000000
80.6882150000000
80.5758130000000
80.4634110000000
80.3884770000000
80.2760750000000
80.1262060000000
80.0325370000000
79.9576030000000
79.8264670000000
79.7327990000000
79.6391310000000
79.5079950000000
79.3768600000000
79.2831910000000
79.1707890000000
79.0209200000000
78.9272520000000
78.7961160000000
78.6837150000000
78.5713130000000
78.4776440000000
78.3652420000000
78.2341070000000
78.1217050000000
78.0280370000000
77.9343680000000
77.8407000000000
77.7282980000000
77.6158960000000
77.5222280000000
77.4285600000000
77.3348920000000
77.2224900000000
77.1475550000000
77.0351530000000
76.9602190000000
76.8478170000000
76.7541480000000
76.6792140000000
76.6042790000000
76.5106110000000
76.4169430000000
76.2858070000000
76.2108720000000
76.1359380000000
76.0048020000000
75.8924000000000
75.7612650000000
75.6488630000000
75.5364610000000
75.4240590000000
75.3491250000000
75.1992550000000
75.1055870000000
74.9931850000000
74.8995170000000
74.8058490000000
74.6559790000000
74.5623110000000
74.4311760000000
74.3000400000000
74.1689040000000
74.0190350000000
73.9066330000000
73.8316990000000
73.7192970000000
73.5694280000000
73.5132270000000
73.4382920000000
73.4195580000000
73.4195580000000
73.4570260000000
73.5881610000000
73.7942310000000
74.0752360000000
74.4873770000000
75.0493860000000
75.7612650000000
76.5668120000000
77.5971630000000
78.7773830000000
80.1262060000000
81.6810990000000
83.3296600000000
85.0906230000000
86.9452550000000
88.9310220000000
90.9355230000000
92.9400230000000
95.0007250000000
96.9490250000000
98.8223900000000
100.583353000000
102.306849000000
103.824275000000
105.173098000000
106.428253000000
107.496071000000
108.376552000000
109.088431000000
109.725375000000
110.212450000000
110.587123000000
110.849395000000
110.999264000000
111.055465000000
111.017997000000
110.924329000000
110.774460000000
110.568390000000
110.306119000000
109.968913000000
109.612974000000
109.107165000000
108.582623000000
107.983146000000
107.327468000000
106.615589000000
105.772575000000
104.910827000000
103.955411000000
102.999994000000
102.025844000000
100.995494000000
99.9838760000000
99.0097260000000
98.0168430000000
97.0988940000000
96.2184120000000
95.4503330000000
94.7197200000000
94.0453090000000
93.4832990000000
93.0149580000000
92.5840840000000
92.2656120000000
92.0220740000000
91.7785370000000
91.6474010000000
91.4975320000000
91.4413310000000
91.4225980000000
91.3289290000000
91.2914620000000
91.2914620000000
91.2352610000000
91.2165270000000
91.1415930000000
91.0853920000000
91.0104570000000
90.8980550000000
90.7856530000000
90.6919850000000
90.5233820000000
90.3547790000000
90.1674430000000
90.0175740000000
89.8489710000000
89.6429010000000
89.4180970000000
89.2120270000000
89.0246900000000
88.7998860000000
88.6125500000000
88.4252130000000
88.2004090000000
87.9756060000000
87.7882690000000
87.6009330000000
87.4323300000000
87.2637270000000
87.0389230000000
86.8890540000000
86.7391850000000
86.5518480000000
86.3645120000000
86.1959090000000
86.1022410000000
85.9523710000000
85.8212360000000
85.6713670000000
85.5402310000000
85.4278290000000
85.2966940000000
85.2217590000000
85.0906230000000
85.0718900000000
84.9220200000000
84.8283520000000
84.7346840000000
84.6784830000000
84.5848150000000
84.4911460000000
84.4349460000000
84.3974780000000
84.2850760000000
84.2663430000000
84.2663430000000
84.1539410000000
84.0977400000000
84.0602730000000
84.0415390000000
84.0040720000000
83.9478710000000
83.9291370000000
83.8916700000000
83.8354690000000
83.8167350000000
83.7792680000000
83.7418000000000
83.7418000000000
83.6855990000000
83.6293990000000
83.6106650000000
83.5544640000000
83.5169970000000
83.4607960000000
83.4045950000000
83.3483940000000
83.2734590000000
83.1985250000000
83.1048560000000
83.0111880000000
82.9549870000000
82.8613190000000
82.7489170000000
82.6739820000000
82.5803140000000
82.4866460000000
82.3929780000000
82.2618420000000
82.1681740000000
82.0557720000000
81.9246360000000
81.7747670000000
81.6436310000000
81.4937620000000
81.3251590000000
81.1752900000000
81.0441550000000
80.8568180000000
80.6882150000000
80.4821450000000
80.3322760000000
80.1449390000000
79.9763360000000
79.7890000000000
79.5829300000000
79.4330610000000
79.2831910000000
79.1520560000000
78.9834530000000
78.8710510000000
78.7211820000000
78.6275140000000
78.5525790000000
78.4963780000000
78.4776440000000
78.4963780000000
78.5900460000000
78.7961160000000
79.0209200000000
79.4143270000000
79.9014020000000
80.5383460000000
81.3251590000000
82.2805760000000
83.4420620000000
84.6972170000000
86.1771750000000
87.6571340000000
89.3618960000000
91.1603260000000
93.0336920000000
94.9632580000000
96.9302910000000
98.8785910000000
100.733222000000
102.644055000000
104.386285000000
105.997379000000
107.533538000000
108.901095000000
110.118782000000
111.167867000000
112.179484000000
112.891363000000
113.528307000000
114.015382000000
114.427522000000
114.745994000000
114.914597000000
115.045733000000
115.045733000000
115.026999000000
114.895864000000
114.727261000000
114.502457000000
114.202718000000
113.846779000000
113.397171000000
112.928830000000
112.310620000000
111.654942000000
110.924329000000
110.100048000000
109.219567000000
108.320352000000
107.346202000000
106.353318000000
105.266766000000
104.255149000000
103.206064000000
102.250648000000
101.276498000000
100.358549000000
99.5155350000000
98.7099880000000
97.9793760000000
97.3424310000000
96.7991560000000
96.3120810000000
95.9186740000000
95.5440010000000
95.2629960000000
95.0381920000000
94.8508560000000
94.7384540000000
94.6260520000000
94.5698510000000
94.4949160000000
94.4949160000000
94.4574490000000
94.4574490000000
94.3825140000000
94.3825140000000
94.3637810000000
94.3075800000000
94.2513790000000
94.1577110000000
94.0827760000000
93.9703740000000
93.8579720000000
93.7081030000000
93.5582340000000
93.4083650000000
93.2210280000000
93.0524250000000
92.8650890000000
92.7339530000000
92.5091490000000
92.3405460000000
92.1532100000000
91.9471400000000
91.7598030000000
91.5724670000000
91.3851300000000
91.1977940000000
90.9542560000000
90.7669200000000
90.5421160000000
If by "one period representative signal" you mean "get the average signal over all the periods", this is how.
This is what your data looks like:
If you know in advance how many cycles are in your signal (9 for your data above), then just reshape your signal into a 9x178 matrix (==numel(signal)/9) and find column means (ie a 1x178 matrix with the average signal).
nwaves = 9;
sig2 = reshape(sig,[numel(sig)/nwaves nwaves])';
avgSig = mean(sig2,1);
plot(avgSig);
If you don't know how many cycles in your signal...you could try doing the fourier transform, but it's not guaranteed...and if the number of data points isn't an exact multiple of the period length, then you'll have to modify the code to deal with that.
% get fourier transform
a = fft(sig);
% get period with max amplitude (but not period=0)
[val ix] = max(abs(a(2:end))) % don't include period=0
nwaves = ix + 1 % add 1 because of the offset above
% then calculate avg & plot as before with this `nwaves`.
(If you plot each 'cycle' though you'll notice that splitting into every 178 elements doesn't quite section your wave into parts from minimum to minimum - you might need to find a smarter way of doing that).