How to plot subsets of geographic plots - matlab

I'm attempting to plot Antarctic sea ice concentration using a Lambert plot. My script produces a plot, but when I want to plot a certain area (not all of Antarctica), the plot goes haywire.
Here's my script:
addpath('D:\wass\m_map')
% m_proj('lambert','lat',[min(lat(:)) max(lat(:))],...
% 'lon',[min(lon(:)) max(lon(:))])
m_proj('lambert','lon',[0 120],'lat',[-80 -50]);
m_pcolor(lon,lat,ice_conc);
shading flat;
% Add a coastline and axis values.
m_coast('patch',[.7 .7 .7])
m_grid('box','fancy')
% Add a colorbar
colorbar
DATA:
lat:
-62.128365 -62.243603 -62.358810 -62.473976 -62.589111 -62.704208 -62.819267 -62.934296 -63.049286 -63.164238 -63.279160
-62.113903 -62.229088 -62.344234 -62.459347 -62.574425 -62.689465 -62.804466 -62.919434 -63.034367 -63.149261 -63.264122
-62.098972 -62.214100 -62.329189 -62.444244 -62.559261 -62.674244 -62.789188 -62.904095 -63.018967 -63.133801 -63.248600
-62.083576 -62.198643 -62.313675 -62.428673 -62.543629 -62.658550 -62.773434 -62.888279 -63.003086 -63.117859 -63.232594
-62.067715 -62.182720 -62.297691 -62.412628 -62.527523 -62.642380 -62.757202 -62.871983 -62.986729 -63.101437 -63.216106
-62.051388 -62.166332 -62.281242 -62.396111 -62.510944 -62.625740 -62.740494 -62.855213 -62.969891 -63.084530 -63.199135
-62.034595 -62.149479 -62.264324 -62.379128 -62.493896 -62.608624 -62.723312 -62.837963 -62.952576 -63.067146 -63.181683
-62.017342 -62.132160 -62.246937 -62.361675 -62.476376 -62.591038 -62.705658 -62.820240 -62.934780 -63.049286 -63.163750
-61.999626 -62.114376 -62.229088 -62.343758 -62.458389 -62.572979 -62.687531 -62.802040 -62.916512 -63.030945 -63.145336
-61.981445 -62.096127 -62.210770 -62.325371 -62.439930 -62.554451 -62.668930 -62.783371 -62.897770 -63.012127 -63.126442
-61.962807 -62.077419 -62.191990 -62.306519 -62.421005 -62.535454 -62.649860 -62.764225 -62.878548 -62.992832 -63.107075
lon:
7.0379410 7.0667295 7.0957541 7.1250162 7.1545200 7.1842675 7.2142620 7.2445068 7.2750049 7.3057594 7.3367739
7.2700686 7.2997870 7.3297477 7.3599544 7.3904090 7.4211159 7.4520774 7.4832969 7.5147777 7.5465226 7.5785356
7.5019569 7.5326014 7.5634961 7.5946436 7.6260471 7.6577096 7.6896348 7.7218256 7.7542858 7.7870178 7.8200259
7.7335982 7.7651658 7.7969913 7.8290763 7.8614254 7.8940411 7.9269266 7.9600859 7.9935217 8.0272379 8.0612373
7.9649854 7.9974732 8.0302258 8.0632458 8.0965376 8.1301022 8.1639452 8.1980686 8.2324772 8.2671738 8.3021612
8.1961117 8.2295170 8.2631931 8.2971449 8.3313751 8.3658857 8.4006824 8.4357672 8.4711447 8.5068178 8.5427895
8.4269686 8.4612885 8.4958858 8.5307655 8.5659304 8.6013851 8.6371317 8.6731739 8.7095165 8.7461624 8.7831154
8.6575518 8.6927814 8.7282963 8.7641010 8.8001976 8.8365908 8.8732843 8.9102812 8.9475851 8.9851999 9.0231295
8.8878517 8.9239883 8.9604177 8.9971437 9.0341692 9.0714979 9.1091337 9.1470804 9.1853418 9.2239227 9.2628250
9.1178627 9.1549034 9.1922426 9.2298861 9.2678366 9.3060970 9.3446722 9.3835649 9.4227810 9.4623222 9.5021944
9.3475780 9.3855181 9.4237652 9.4623222 9.5011930 9.5403814 9.5798922 9.6197281 9.6598930 9.7003918 9.7412281
ice_conc:
87.1799980513752 89.0399980098009 90.2999979816377 91.1299979630858 90.7499979715794 91.6499979514629 91.1699979621917 91.1799979619682 89.6499979961664 86.2899980712682 86.7199980616570
87.1999980509281 89.7599979937077 90.4399979785085 90.2799979820848 90.3399979807437 91.1999979615212 90.1599979847670 88.4699980225414 89.1099980082363 86.7199980616570 86.4899980667979
86.8699980583042 88.9499980118126 90.3699979800731 90.2999979816377 88.9999980106950 88.9399980120361 89.1399980075657 88.5199980214238 88.2399980276823 86.2299980726093 86.2799980714917
86.3299980703741 88.0099980328232 88.0599980317056 87.2799980491400 88.3499980252236 88.1699980292469 88.8699980136007 87.7999980375171 85.9699980784208 85.9699980784208 86.0299980770797
85.3499980922788 86.5599980652332 86.3699980694801 87.4099980462343 87.1399980522692 86.9499980565161 86.5099980663508 86.0199980773032 85.6299980860204 85.3199980929494 85.1499980967492
83.8599981255829 85.7199980840087 86.1799980737269 85.7899980824441 86.1099980752915 86.4599980674684 85.7799980826676 85.4599980898202 84.4199981130660 84.2099981177598 83.6599981300533
83.2699981387705 83.9299981240183 85.1999980956316 85.6399980857968 85.7799980826676 84.7999981045723 84.2599981166422 83.4699981343001 83.3599981367588 83.1799981407821 82.3999981582165
82.2099981624633 82.6799981519580 84.4099981132895 84.0999981202185 83.7199981287122 83.7799981273711 82.9999981448054 82.6099981535226 81.8799981698394 81.9599981680512 81.6699981745333
82.9399981461465 82.1599981635809 83.6599981300533 85.5099980887026 85.6899980846793 84.7699981052429 82.3699981588870 81.9499981682748 81.6099981758744 80.7599981948733 81.0299981888384
81.1899981852621 82.4899981562048 85.8299980815500 85.4799980893731 84.9399981014431 85.0699980985373 83.0799981430173 82.0899981651455 81.2599981836975 79.9599982127547 78.8099982384592
81.5299981776625 81.9499981682748 84.5999981090426 84.8699981030077 85.5799980871379 84.1099981199950 83.5099981334060 82.1499981638044 80.6599981971085 79.4499982241541 79.6899982187897

Related

Matlab generate a heatmap on sphere

I have points that are all part of a spherical surface. How can I create a 3D sphere where the color of the sphere is determined by the density of the points (smoothed). An example of data points can be found in the picture below.
Using the following code, the points can be colored:
x = data(:,1);
y = data(:,2);
z = data(:,3);
D = [x(:), y(:), z(:)];
N = numel(x);
%// calculation of color vector
[n,m] = ndgrid(1:N,1:N);
%// euclidian distance of each point to every other point
X = arrayfun(#(a,b) sum( (D(a,:) - D(b,:)).^2 ), n, m);
%// threshold factor
T = 1;
%// sort distances of points
Y = sort(X,2);
%// calculate average distance of the closest T% of all points
Z = mean(Y(:,2:ceil(N*T)),2);
%// plot
colormap jet;
scatter3(x,y,z,20,-Z,'filled');
title('T = 0.01')
Now, I want to color a sphere according to the data. The following figure is for random data.
[x,y,z] = sphere;
surf(x,y,z,rand(length(x)));
colormap jet
shading interp
Sample of my data:
-0.636016480755703 0.617525876796302 -0.0928047432418846
-0.973951523685005 1.33968621140501 -0.484260283616615
-1.09449677739217 1.95314823996034 -0.997620228061477
-1.27650273224044 2.30054644808743 -1.52076502732240
-1.34107124912069 2.50643151442066 -1.93523263993568
-1.41743718592965 2.64326633165829 -2.38693467336683
-1.52722674072605 2.66172386431264 -2.68924816504662
-1.78737177571955 2.53918932377253 -2.86176675629917
-2.13798636181308 2.25411151223426 -2.71760930605696
-2.63246062794664 1.72971210753335 -2.72474671481593
-3.03187531422826 1.12946204122675 -3.07732528909000
-3.24477552244776 0.394710528947106 -3.67518248175182
2.78947368421053 1.11300309597523 -4.46904024767802
2.49650108417110 1.17716341415336 -4.93987778434851
2.52268839923534 0.940134822416742 -5.07883086829661
2.87130058385343 0.507398832293135 -4.76887457217636
3.04415584415584 0.461038961038961 -4.41298701298701
3.09087249672940 0.653567475093087 -4.11894938110094
3.11987397479496 0.702540508101620 -3.94573914782957
3.17966101694915 0.719840478564307 -3.52233300099701
3.12836149155253 0.840997700689793 -2.86519044286714
2.97330943133154 0.892490787770142 -2.26048202370282
2.81690697215090 0.873000197511357 -1.86114951609718
2.72014039944631 0.816195372750643 -1.64094324698438
2.50647023691021 0.872387019709337 -1.35715707744376
2.23888664376642 0.836886239644373 -1.02939987876339
1.96850235730765 0.814575183067509 -0.776808105125891
1.64841095342794 1.11333200079952 -0.690885468718768
1.36944528036914 1.18331828668874 -0.567609589728157
0.920234429323533 0.813251216847125 -0.225489222211184
0.570574643359454 0.388738195700221 -0.0264215390797675
0.316863696069516 -0.0561281196322118 0.0646660604223506
0.338646811912852 -0.391515090945433 0.0651609034579250
0.479434319290907 -0.676526242406135 0.0231052683995618
0.505991285403050 -0.746187363834423 0.00925925925925952
0.399658325796402 -0.813636820420058 0.0130640136669684
0.182226660009985 -0.957613579630554 0.00439340988517190
-0.0248032672576950 -1.24863034166750 -0.0676860245044320
-0.283441074092491 -1.72710094480358 -0.272948781700647
-0.527511004401761 -2.34133653461385 -0.705782312925170
-0.797852242219350 -2.97176096251367 -1.49487918862484
-0.922330097087379 -3.29166249624662 -2.23876488839956
-0.898067487734055 -3.46104936417343 -3.16261139481326
-0.727430211839240 -3.46159176400713 -3.78058800237577
-0.614893829129698 -3.34522978765826 -4.33002691655867
-0.453940686573228 -3.06104001625025 -4.98694901482836
-0.173647905628312 -2.72118364490653 -5.48340497850645
0.0242345666699911 -2.38655629799541 -5.81115986835544
0.198836859520706 -2.10383034192319 -6.01564223403189
0.380042037834051 -1.79871884696227 -6.17951156040436
0.423617429986857 -1.63856030735012 -6.25290668284299
0.368721000605205 -1.66920516441396 -6.24581400040347
0.0171154038634771 -1.99409468521670 -6.09303373035732
-0.396368687369779 -2.45550153785098 -5.72055759499951
-0.911024174942322 -3.02593038419099 -4.85911325107834
-1.22442557442557 -3.29275724275724 -3.85614385614386
-1.22364472894579 -3.30446089217844 -2.70414082816563
-1.09318766066838 -3.01586909234724 -1.74006327862369
-0.846371252649642 -2.61244574543252 -1.05284142525487
-0.594202898550724 -2.24637681159420 -0.644927536231885
-0.493466023321271 -2.07438681141938 -0.501708886208283
-0.414079822616408 -1.88802660753880 -0.374168514412417
-0.0486402719456110 -1.25204959008198 -0.0690361927614474
0.514052222443692 -0.238489136934423 0.0455451465018948
1.25832163625426 0.215410066172047 -0.196310407058352
1.72030784508441 0.633813306852036 -0.532571996027806
2.33757173956066 1.28933306946368 -1.43583019988126
2.66762105686156 1.66294956801286 -2.65888085191883
2.82720953326713 1.42879841112215 -3.80993048659384
2.70761349939735 1.02732020891924 -4.72047006830052
2.42173094081491 0.500297412511153 -5.41731932189947
1.64370927318296 -0.734636591478697 -6.11152882205514
1.19525675811476 -1.17174153351422 -6.22434931162697
1.11648548917922 -1.26179315847213 -6.22569063528473
1.11648548917922 -1.26179315847213 -6.22569063528473
1.29463307776561 -1.04600219058050 -6.21905805038335
1.69427680547174 -0.494216455441561 -6.11265338966003
2.19971642697995 0.369252582540004 -5.67956248734049
2.63406087304766 1.03103724469363 -4.84551461754105
2.90801393728223 1.36689895470383 -3.48257839721254
2.69187842551071 1.30109616342800 -2.03637269556552
2.04063692987744 0.843078159533856 -0.848754269640346
1.28362077559565 0.0458578406938491 -0.185724254810089
0.722807017543860 -0.518245614035088 -0.00491228070175431
0.548188515490968 -0.832172772227268 -0.0118579069532743
0.489908530522967 -1.08401272618811 -0.0579140982302633
0.485282298573438 -1.30887080570625 -0.124573035965441
0.674118231495281 -1.33253849975161 -0.168007948335817
0.910319782104308 -1.33229093110057 -0.229244426510643
1.52194752774975 -1.40302724520686 -0.515186680121089
1.94507084414289 -1.55647575334265 -0.876222310915985
2.35918818446699 -1.89234401687933 -1.55827388727017
2.71365858525392 -2.06993913997805 -2.58001596328445
2.86434225027552 -1.95721871555956 -3.17287846909127
2.85724240915879 -1.92110502737680 -3.66057740169238
2.87056949422541 -1.78156113102350 -3.98426921545201
2.87284396309667 -1.61111111111111 -4.25952667468913
2.80383257690368 -1.63519919314170 -4.40963187090267
2.74593029062219 -1.74528113452512 -4.41146509537601
2.79961927662559 -1.78649433924456 -4.21245366195772
2.90093495126318 -1.80893176845037 -3.77849612094689
2.92225456735595 -1.85735796024895 -3.29276249749046
2.79813695871098 -1.99234642497482 -2.74043303121853
2.69918862065511 -1.87313432835821 -2.15235901031754
2.52209558088382 -1.58498300339932 -1.52319536092781
2.00474364150182 -1.47204279370206 -0.880904319741623
1.51878192927978 -1.62576379845738 -0.618351197034960
1.23150095123661 -1.63627716030840 -0.477520777010114
0.531772406847935 -1.78439073514602 -0.336606243705942
0.0184244597151679 -1.70859476147794 -0.250473060452145
-0.761328398519556 -1.39836951085326 -0.212463739121736
-1.14685385314615 -1.00161599838400 -0.209473790526209
-1.46421063169486 -0.401441585744319 -0.256982680949045
-1.65316831683168 0.183663366336634 -0.385742574257425
-1.74656382873529 0.675961633540987 -0.563532087412242
-1.89565826330532 0.973389355742297 -0.793417366946779
-2.13232939763858 1.09455673404042 -1.06588953372023
-2.22335431025872 1.24398162021776 -1.26261112775946
-2.25349301397206 1.26686626746507 -1.31457085828343
-2.32195949316572 1.27616482091190 -1.40491868701985
-2.32195949316572 1.27616482091190 -1.40491868701985
-2.25349301397206 1.26686626746507 -1.31457085828343
-1.94300518134715 1.07393383818254 -0.884216819449980
-1.58513309894525 0.672978402812657 -0.464239075841286
-1.23895482198065 0.186895382467338 -0.184202652837339
-0.579979879275654 -0.312776659959758 0.0340040241448691
0.0370258577321662 -0.908441493107959 0.0195693731763762
0.0376980148385803 -1.41537998796872 -0.125025065169440
-0.218357293656379 -1.75379511410476 -0.280838443751885
-0.596396934408281 -2.03976311336717 -0.499353040708669
-0.921337706221428 -2.33015305108328 -0.810922281852514
-1.15569341604963 -2.61947168300981 -1.20672403442065
-1.34566968781470 -2.98257804632427 -1.89088620342397
-1.47722515698196 -3.13345958337486 -2.45724110435563
-1.56538309245694 -3.18704216986735 -3.03009305088101
-1.66732830488289 -3.12643906312029 -3.51667328304883
-1.69259886442873 -3.09971112660624 -3.62316963841020
-1.71797696544817 -3.10520781171758 -3.39609414121182
-1.73907022749753 -3.08506429277943 -2.99891196834817
-1.55176565008026 -3.07383627608347 -2.38804173354735
-1.29407651583258 -2.96668664469084 -1.81125761662172
-1.06947201270345 -2.71119491861850 -1.26915442635967
-0.663021769522668 -2.13655881765528 -0.580487317755142
-0.209927507047926 -1.41683447442610 -0.132400322190898
0.163531402408679 -0.794366477555489 0.0366278491091858
0.418277331747448 -0.462037863019130 0.0522846664684309
0.586739327883742 -0.290644868301544 0.0331516802906444
0.652918908149034 -0.108686989440127 0.0178322374975086
0.687443901466042 0.142016555300688 -0.00982347661314398
0.774385999801134 0.549766331908124 -0.105846673958437
0.841714797849034 0.982473610834495 -0.267128062139017
0.827499243417734 1.33965499848684 -0.436951477857360
0.812180194642320 1.71977525835256 -0.683806561653456
0.701562344511892 1.92168374962683 -0.817593790426909
0.435846429281878 2.00925004973145 -0.835289437039984
0.0682452642073778 2.07342971086740 -0.857926221335992
-0.307490144546649 2.10891539472354 -0.912059031638532
-0.719540461553966 2.05698881386677 -0.951073264133830
-1.10075818036712 2.00598563447726 -1.05367118914605
-1.56707560343108 1.90325154598045 -1.24182126471175
-1.69690374913443 1.87555643486003 -1.31931941834009
-1.91472868217054 1.74031007751938 -1.37984496124031
-2.14285714285714 1.58571428571429 -1.47142857142857
-2.36444466520962 1.38793959864892 -1.56134512219352
-2.58613043040016 0.984326176796694 -1.54314081241810
-2.78857029467209 0.479015775374541 -1.57148526639548
-2.87015945330296 -0.105922551252847 -1.55694760820046
-2.83612343686971 -1.03781766841468 -1.68132311415894
-2.71839481555334 -1.49127617148554 -1.76859421734796
-2.48778316351766 -1.82011079236324 -1.67815807696112
-2.17667773417849 -2.01398531039340 -1.44018512928866
-1.81555333998006 -2.16919242273180 -1.21395812562313
-1.31528822055138 -2.21709273182957 -0.899348370927319
-0.798962386511025 -2.21465629053178 -0.675745784695200
-0.261611611611612 -2.25895895895896 -0.600350350350350
0.208694338101954 -2.17585129961717 -0.534757203304453
0.449437082793664 -1.88831324100827 -0.379645312344326
1.00702458605118 -1.46929252383342 -0.313296537882589
1.28716658278812 -1.08983392048314 -0.289783593356819
1.57556687643592 -0.714613924682849 -0.347118170012986
1.68775020016013 -0.484787830264211 -0.382706164931946
1.61437908496732 -0.599346405228758 -0.352287581699347
1.57417582417582 -0.575274725274726 -0.327472527472528
1.78015328761597 -0.188987494957644 -0.430012101653893
2.06253743262128 0.340786584148532 -0.696196845677780
2.25189017111023 0.728014325507362 -0.992240350179069
2.30490383647165 0.963548484543349 -1.16680092639211
2.16848971399900 1.16432513798294 -1.14706472654290
1.52051204515674 1.44758592883782 -0.814585223263785
0.938315894369706 1.52640757349278 -0.587493771798705
0.270871327254306 1.42152988855117 -0.376393110435664
-0.431318681318681 1.27967032967033 -0.317582417582417
-1.24290141971606 1.11672665466907 -0.472905418916217
-1.67691236446832 0.878344772704665 -0.596737292350543
-2.09241823587711 0.562239841427156 -0.782804757185331
-2.46963156309608 0.160676638891678 -1.04607971087240
-2.80539575481055 -0.297758381273557 -1.44653838524102
-3.04411764705882 -0.720588235294118 -1.97058823529412
-3.10657776893223 -0.932530600059707 -2.24584535774704
-3.10657776893223 -0.932530600059707 -2.24584535774704
-3.09186140209508 -0.923851732473811 -2.19580983078163
-3.06973971786211 -0.972282932644546 -2.16371945161931
-2.97409275190349 -1.18797587263918 -2.06679521408089
-2.58697813121272 -1.65029821073559 -1.67783300198807
-2.17490305260018 -1.82484836432336 -1.27145271949886
-1.54121682978509 -1.85420240137221 -0.764806780345071
-0.516422082459818 -1.59888190076869 -0.243535988819008
0.621063189568706 -1.10441323971916 -0.0862587763289868
1.66834120365719 -0.593388927961419 -0.382296794936200
2.25558547775783 -0.621284659884301 -0.821115100738080
2.66296629662966 -0.781178117811781 -1.31313131313131
2.87842586085734 -1.01686577652846 -1.74947294448349
2.96028014007004 -1.22826413206603 -2.06478239119560
2.91112000800721 -1.21779601641477 -1.94089680712641
2.57236973447794 -0.810141744859253 -1.20203633459772
1.39727199516811 -0.142490436883430 -0.223273605798269
-0.231495280675608 -0.227620466964729 0.0772975658221564
-1.18559766176174 -0.862426930054425 -0.193156621648861
-1.58402645555667 -1.20913919230384 -0.475849283495340
-1.75749674054759 -1.35924180122355 -0.641209507571959
-1.79383084577114 -1.39004975124378 -0.679502487562189
-1.71299871299871 -1.39956439956440 -0.629096129096129
-1.11655827913957 -1.16223111555778 -0.242321160580290
-0.445971516781197 -0.933323374165920 -0.0159346678617660
0.420428269830099 -0.767165979692369 0.0181461747260472
1.62276740919125 -0.599237407184427 -0.356963676500100
2.24262721183645 -0.868489453164051 -0.859792062381285
2.62592815572948 -1.10194661850291 -1.37818583182822
2.92154718106791 -1.41344337277518 -2.13826190712936
3.03345724907063 -1.55018587360595 -2.76765799256506
3.09189297524802 -1.50085178875639 -3.27382503256839
3.09373122371320 -1.44131784498298 -3.61686360905267
3.12990756386045 -1.36810456217076 -3.53021568432561
3.24122807017544 -1.02192982456140 -3.09649122807018
3.16491701659668 -0.546140771845631 -2.23975204959008
2.47121620273371 -0.127007881871695 -1.01326948019555
1.11460425873845 -0.123443149859381 -0.108879067898755
-0.332014246141670 -0.423624851602691 0.0643055005935889
-1.35305494941480 -1.01175362031343 -0.298055941281492
-1.85162601626016 -1.81846123339282 -0.961679555819949
-2.02630258006224 -1.98925810661580 -1.25148077502259
-2.06198595787362 -1.93941825476429 -1.24523570712136
-2.02630258006224 -1.98925810661580 -1.25148077502259
-1.88748763600396 -1.92814045499505 -1.07141444114738
-0.928151469855506 -1.61086198305929 -0.349725959142999
-0.0390547263681593 -0.873084577114428 0.0264676616915427
0.855323383084577 -0.356019900497513 -0.0278606965174126
1.91169066559259 -0.262007854193938 -0.516816030611217
2.74024280124411 -0.390037122504264 -1.35356677034213
3.18088116410671 -0.598625707356508 -2.30901374292644
3.27699018538713 -0.869138495092693 -3.19520174482007
3.20708582834331 -1.02165668662675 -3.74411177644711
3.14159113796576 -1.02769385699899 -4.05659617321249
3.13289695527125 -1.02211643360111 -4.09486264008728
3.23694438907714 -0.827287223440303 -3.81029499701017
3.32393239323932 -0.460796079607961 -3.07100710071007
2.90476664344711 -0.0317444521842970 -1.62528609811922
1.52950526524935 -0.148023047883966 -0.287701172263063
0.185110663983903 -0.638430583501006 0.0575452716297797
-1.09335745151241 -1.15500954677922 -0.231635011556627
-1.58385217915244 -1.54348262703354 -0.614982928298855
-1.71489128266507 -1.62602234191103 -0.741871135048873
-1.71489128266507 -1.62602234191103 -0.741871135048873
-1.65856458374925 -1.63770213615492 -0.710620882411659
-1.41790441547944 -1.54981307466909 -0.525108618773366
-1.29696668324217 -1.44157135753357 -0.417503729487817
-1.12397315167301 -1.18648567421358 -0.252554598276898
-0.854046242774566 -1.05780346820809 -0.128612716763007
-0.666666666666667 -1.33333333333333 -0.166666666666667
-0.521618405394685 -1.73125743752479 -0.307417691392304
-0.0915189746670674 -2.03509562431161 -0.433964153399419
1.20271210013908 -1.81606397774687 -0.561891515994436
1.86270346779901 -1.85527246992215 -0.996461429582448
1.86263846928499 -1.97301107754280 -1.08509566968782
1.76366703045937 -2.14922115289215 -1.15061017958131
1.76361819090455 -2.18985507246377 -1.18805597201399
1.68721529015647 -2.17250940780353 -1.10937809467221
1.65447768711595 -2.04371914979349 -0.976176085423593
1.60033760301857 -1.90715916989375 -0.838000198590011
1.44555845197514 -1.94866653298576 -0.770102265891318
1.31015187849720 -2.06075139888090 -0.774180655475619
1.16209202515221 -2.18400039924144 -0.793542269687593
1.04569463823002 -2.24302371935420 -0.788419374127964
0.958153103309526 -2.11618549441706 -0.656875565838447
0.961211161686127 -2.03423708687908 -0.600930140510587
1.00920920920921 -1.94034034034034 -0.557557557557558
1.01808382027000 -1.80727382631473 -0.481714688696353
0.951635560907084 -1.49859522376079 -0.307144290587999
0.803406952560166 -1.35560067346737 -0.207437852827573
0.785593473286240 -1.22505223360860 -0.158541438662819
0.580485838121157 -1.15290797298659 -0.0920270134059069
0.264785894206549 -1.10916876574307 -0.0380352644836268
-0.0502447307961242 -1.05444011587254 -0.0134352212566178
-0.339005104594135 -0.957711940746672 -0.00820738664798304
-0.516057585825028 -0.699889258028793 0.0143964562569212
-0.282254028625763 -0.610899809828846 0.0537984185767195
-0.313627353815659 -0.525173439048563 0.0592170465807742
-0.180463242698892 -0.550251762336354 0.0669687814702917
-0.0783649052841476 -0.817248255234297 0.0358923230309078
-0.0305602716468592 -0.871467092779387 0.0268650754019779
-0.0276997189883579 -0.866118024889603 0.0279004415897233
0.362864321608040 -0.759547738693467 0.0262311557788948
0.767242249823286 -0.540644249217409 -0.0170655356962532
0.732645497345487 -0.599569267755184 -0.0148752879895824
0.702180028129395 -0.490857946554149 0.00175808720112514
0.751281793505580 -0.310244294762240 -0.000854529003719851
0.798241206030151 -0.355075376884422 -0.0132160804020103
0.747126436781609 -0.454022988505747 -0.00574712643678188
0.489324726911619 -0.520953326713009 0.0381827209533263
0.258796481407437 -0.628248700519792 0.0537784886045589
0.217539977873881 -0.714723926380368 0.0457105501357740
0.0984422110552764 -0.856180904522613 0.0283919597989950
-0.154428614127727 -0.990734283152336 -0.00154428614127733
-0.298350228582787 -1.19866825680779 -0.0662890081494729
-0.546631864270656 -1.23100090352374 -0.109326372854132
-0.911847389558233 -1.03815261044177 -0.139959839357430
-1.06025781952633 -0.891775756970121 -0.153392625162387
-0.956119162640902 -0.889291465378422 -0.119162640901771
-0.957903780068729 -0.776632302405498 -0.0987972508591066
-0.983094928478544 -0.673201960588177 -0.0909772931879562
-0.917893375770838 -0.729809031231351 -0.0794708573702003
-0.916733911640105 -0.691194270728263 -0.0735323784547108
-0.849363437437836 -0.799035209866720 -0.0716132882434848
-0.744629833150165 -0.799330602457788 -0.0455090418623234
-0.598454636091725 -0.811714855433699 -0.0171485543369885
-0.481754002187531 -0.860495177488317 -0.00651287660336042

Manually select peaks on a plot with MATLAB

I am finding and plotting local maximas and minimas on a waveform with the function findpeaks. I would like to be able to select some of those peaks with a pointer directly from the plot and get the coordinates into the workspace.
Is that possible?
Here is a subset of an example dataset:
data = [-4.89540984473946e-06 -4.89046450287593e-06 -4.88283149336408e-06 -4.87095198116254e-06 -4.90712807029133e-06 -4.91927636347547e-06 -4.84407526018980e-06 -4.87589730823133e-06 -4.92470545237800e-06 -4.84429026519065e-06 -4.94884075275366e-06 -4.97668505593799e-06 -5.05091858731457e-06 -4.91637367843710e-06 -4.84267768702634e-06 -4.89191584860588e-06 -4.84660167647784e-06 -4.83337832656191e-06 -4.79032179995216e-06 -4.76624025231771e-06 -4.75887604778215e-06 -4.70856280330800e-06 -4.64964899691363e-06 -4.72963414438675e-06 -4.83950621114218e-06 -4.81381203536647e-06 -4.83251825696249e-06 -4.87320964430400e-06 -4.90336533160774e-06 -4.83783986967173e-06 -4.80376018565747e-06 -4.74447010720748e-06 -4.84961187054251e-06 -4.83536719945138e-06 -4.79919111834559e-06 -4.85611601862430e-06 -4.82606784644511e-06 -4.85471844872184e-06 -4.84386025701412e-06 -4.81515589140679e-06 -4.83353956282112e-06 -4.88793805514151e-06 -4.79279444702247e-06 -4.81897238803632e-06 -4.80263134571406e-06 -4.89245337024318e-06 -4.87165078787927e-06 -4.71388435646062e-06 -4.79182688643761e-06 -4.86353400235825e-06 -4.90288153698267e-06 -4.88181018900206e-06 -4.90814939463545e-06 -5.02565445022868e-06 -4.97270728327852e-06 -4.89395845050979e-06 -4.89019572804071e-06 -5.00581942056473e-06 -4.85815866007998e-06 -4.87890749444223e-06 -5.05392877098134e-06 -4.96442924133893e-06 -5.00549688200667e-06 -4.98668317977521e-06 -4.92502796151073e-06 -4.95034584308071e-06 -4.96141905730884e-06 -5.12907611359824e-06 -5.13993428270170e-06 -5.07462383072134e-06 -5.01700012945037e-06 -4.97609373883257e-06 -4.94351913722961e-06 -4.94255157997661e-06 -4.98587686360239e-06 -5.00968963210843e-06 -5.02554690501322e-06 -4.95346351631875e-06 -4.92153396677935e-06 -4.94884073137851e-06 -5.04333930187227e-06 -5.02522438757406e-06 -5.03941530333772e-06 -5.15149128554495e-06 -5.05236989188090e-06 -5.03366368296826e-06 -4.94265906728271e-06 -4.94975453582840e-06 -4.97340605765111e-06 -4.97690002973954e-06 -4.95776378585822e-06 -5.01318362006572e-06 -5.06478693414940e-06 -5.01995653541482e-06 -4.99791762200221e-06 -4.87826241180049e-06 -4.88250895410629e-06 -4.81209190921077e-06 -4.91621236220338e-06 -4.93239215982718e-06 -4.93792876456361e-06 -4.92712431672434e-06 -4.91895378603758e-06 -4.89820494557392e-06 -4.75527449565399e-06 -4.80870541294211e-06 -4.91949131649655e-06 -4.82714288810490e-06 -4.80058867327714e-06 -4.77408822193145e-06 -4.83574342467004e-06 -4.97727628837568e-06 -4.88003626339490e-06 -4.81934860759687e-06 -4.84611783428869e-06 -4.83192693662324e-06 -4.83101311610351e-06 -4.81993989876836e-06 -4.82601401869105e-06 -4.88035875610688e-06 -4.86423272630262e-06 -5.01286106570465e-06 -4.96292411288641e-06 -5.10537080127033e-06 -5.08919099820762e-06 -4.95163586368386e-06 -4.97227720195358e-06 -5.05339117694178e-06 -5.19503154703270e-06 -5.23636796094566e-06 -5.20373960447927e-06 -5.14745972271145e-06 -5.07161360140476e-06 -5.09994166445759e-06 -5.08150423089344e-06 -5.13251627052468e-06 -5.09445880665652e-06 -5.07473128332313e-06 -5.05581009966274e-06 -5.03672760927253e-06 -5.02543936932230e-06 -5.03285734881196e-06 -5.01302231887177e-06 -4.99770257519616e-06 -5.00458300346133e-06 -4.98372665851392e-06 -5.03651257822457e-06 -5.02414929072324e-06 -5.07596763603182e-06 -5.02108534123367e-06 -5.07489254669347e-06 -5.03033093518173e-06 -5.02855705432535e-06 -4.94325033413489e-06 -4.96249408236197e-06 -5.04129663718886e-06 -5.03183602180999e-06 -5.13036612636593e-06 -5.00716318699453e-06 -5.11418632652828e-06 -4.90406407090556e-06 -4.91072949082945e-06 -4.99426235774332e-06 -4.94765810874763e-06 -4.89868871329783e-06 -4.85590093201640e-06 -4.84278510314675e-06 -4.87487593151054e-06 -4.82219753090326e-06 -4.93034948804728e-06 -4.93868128118638e-06 -4.94325032124572e-06 -4.91293336390327e-06 -4.83418454545091e-06 -4.85514840665468e-06 -4.88132633107078e-06 -4.73936344658863e-06 -4.89798991183953e-06 -4.91674987033445e-06 -4.91099825512483e-06 -4.90481661159291e-06 -4.75065167397842e-06 -4.73081662246593e-06 -4.83106683653475e-06 -4.81902605804528e-06 -4.72286113134670e-06 -4.68061089959087e-06 -4.71307799071485e-06 -4.66426985378300e-06 -4.60019573139779e-06 -4.51252383793892e-06 -4.51204005491146e-06 -4.54912995301628e-06 -4.55810677145764e-06 -4.46866099529538e-06 -4.58896123793896e-06 -4.59310026040807e-06 -4.58202705111776e-06 -4.48430326328582e-06 -4.48795850933213e-06 -4.51924300905173e-06 -4.48543207246916e-06 -4.46855349494860e-06 -4.55337646172091e-06 -4.44345063281763e-06 -4.57154513493103e-06 -4.59385281489407e-06 -4.41711142485936e-06 -4.53913178401176e-06 -4.55606412110996e-06 -4.46264060897575e-06 -4.42463692084076e-06 -4.52155441407285e-06 -4.50677221940636e-06 -4.48634589207169e-06 -4.59396031491354e-06 -4.64728375852222e-06 -4.63664057022768e-06 -4.59965820617443e-06 -4.64911136961635e-06 -4.65884073472609e-06 -4.70695008507957e-06 -4.75586573646044e-06 -4.73178420321849e-06 -4.75801590401412e-06 -4.60471101137253e-06 -4.57471658105903e-06 -4.58584353491208e-06 -4.62363222795283e-06 -4.58793992938515e-06 -4.55482781015275e-06 -4.68437364815221e-06 -4.65249784756566e-06 -4.57933937481562e-06 -4.62631990328050e-06 -4.62089081158290e-06 -4.57917812541947e-06 -4.51225507656684e-06 -4.55477405258585e-06 -4.53311141783991e-06 -4.54939872432026e-06 -4.55117257965666e-06 -4.52789733425270e-06 -4.50650345378238e-06 -4.47903543044462e-06 -4.48312069612006e-06 -4.51419020129353e-06 -4.50145062688468e-06 -4.52735977698723e-06 -4.54450714032921e-06 -4.55117256252312e-06 -4.46608084509033e-06 -4.53407896158256e-06 -4.45140614557067e-06 -4.41920781351070e-06 -4.52881111872715e-06 -4.44624582148976e-06 -4.45909289459186e-06 -4.46274812107349e-06 -4.45748027280859e-06 -4.50951361740786e-06 -4.46887600458167e-06 -4.50902983974733e-06 -4.47457387229324e-06 -4.42200300467295e-06 -4.43549511692057e-06 -4.37695759401414e-06 -4.38319299076052e-06 -4.39695388751217e-06 -4.56692232078024e-06 -4.43619390131638e-06 -4.48392698684545e-06 -4.48269064668583e-06 -4.49526895605598e-06 -4.40947842813550e-06 -4.40765081368960e-06 -4.33094463147224e-06 -4.39802895440372e-06 -4.48215311323093e-06 -4.44398817350220e-06 -4.42307806797564e-06 -4.38330048298545e-06 -4.45748025906533e-06 -4.51983429633548e-06 -4.44973978296766e-06 -4.46274812303772e-06 -4.36239041550375e-06 -4.35497242302094e-06 -4.24794928477930e-06 -4.29444601665229e-06 -4.36255164763265e-06 -4.43114106994723e-06 -4.39652385759326e-06 -4.43802152606982e-06 -4.36142284958266e-06 -4.32116148894134e-06 -4.22204010180950e-06 -4.20666662863045e-06 -4.33357855390536e-06 -4.37615130510219e-06 -4.25902249968437e-06 -4.16731909488875e-06 -4.29810127026078e-06 -4.30869069847499e-06 -4.21639599654153e-06 -4.34551183219518e-06 -4.27622361239748e-06 -4.32411793285627e-06 -4.33782507529094e-06 -4.35932646891537e-06 -4.35491868199967e-06 -4.42931346065645e-06 -4.46446822094393e-06 -4.42098166754579e-06 -4.37857017732590e-06 -4.38722450174974e-06 -4.40017908708695e-06 -4.43764524852276e-06 -4.39534127545859e-06 -4.44006415615985e-06 -4.46984357275167e-06 -4.45694274459542e-06 -4.52381204489461e-06 -4.59718551829175e-06 -4.64292971925335e-06 -4.59562668122636e-06 -4.55998814171054e-06 -4.69238290131149e-06 -4.68259978578968e-06 -4.78618271604811e-06 -4.74554508911485e-06 -4.77306687647779e-06 -4.82902422748630e-06 -4.74022349874821e-06 -4.78967667659056e-06 -4.68560999623238e-06 -4.70399367174356e-06 -4.83488333484937e-06 -4.81424200588459e-06 -4.80553395017146e-06 -4.82827164485003e-06 -4.89798988689285e-06 -4.90750427683425e-06 -4.91562106073226e-06 -4.85041811053271e-06 -4.83198067332453e-06 -4.90702049436914e-06 -5.01140971443911e-06 -4.95115207847818e-06 -4.96695560075888e-06 -4.95894634250918e-06 -4.97442733132394e-06 -5.00146533478908e-06 -4.98619934294484e-06 -5.10123174293496e-06 -5.14579337049380e-06 -5.02968589389739e-06 -5.10698337504644e-06 -5.14235315096857e-06 -5.13294629440792e-06 -5.12536706933419e-06 -5.11187493758741e-06 -5.04264047326268e-06 -5.07591387573231e-06 -5.11225121369745e-06 -5.12934481360250e-06 -5.14127807813422e-06 -5.04500564269106e-06 -5.12020673493844e-06 -5.23507787622358e-06 -5.16761728731260e-06 -5.12241062730512e-06 -5.10370441798274e-06 -5.13896668771534e-06 -5.16347825893636e-06 -5.25781558024835e-06 -5.26351346598172e-06 -5.16976743555304e-06 -5.14740596681149e-06 -5.14332071497995e-06 -5.20433089563993e-06 -5.13348383832941e-06 -5.21475907516790e-06 -5.27114645029502e-06 -5.29974328192358e-06 -5.29243281497749e-06 -5.18336704101590e-06 -5.18395833370644e-06 -5.19659038991682e-06 -5.22938000548113e-06 -5.15821043730756e-06 -5.18094815047183e-06 -5.27109269003538e-06 -5.21121133937498e-06 -5.15466270877798e-06 -5.22427343410753e-06 -5.13552647587313e-06 -5.09585642010333e-06 -5.02425678371832e-06 -5.08773962439909e-06 -5.11273501095427e-06 -5.09085734648637e-06 -5.13472017070403e-06 -5.11026234651260e-06 -4.93830501777556e-06 -4.90132261051010e-06 -4.98695189641788e-06 -5.11074611982211e-06 -5.12391570943425e-06 -4.99458489423704e-06 -4.95819380936770e-06 -4.89487222615777e-06 -4.84273136321247e-06 -4.92911319316957e-06 -4.97044959434856e-06 -5.06478691361076e-06 -4.95066831680678e-06 -4.95932263243045e-06 -4.89304460217765e-06 -4.90718177731852e-06 -4.95448481663433e-06 -4.98480176798481e-06 -5.01522623575681e-06 -4.96674060947798e-06 -4.89132449101996e-06 -4.88998066549326e-06 -4.97308351915836e-06 -4.98173782509740e-06 -4.94244403930944e-06 -4.86971560265590e-06 -5.02646069264862e-06 -5.00512057189556e-06 -5.05828274361789e-06 -5.01850518922777e-06 -4.98619935583612e-06 -5.01823641196971e-06 -4.95486109073768e-06 -4.96496672723791e-06 -4.95136708846810e-06 -5.01393612496185e-06 -5.11461636982289e-06 -5.14229939099664e-06 -5.16627342760414e-06 -5.13149494555811e-06 -5.22309085185195e-06 -5.20900744562811e-06 -5.10085549026536e-06 -5.12719468332557e-06 -5.16960616961794e-06 -5.22631606661904e-06 -5.17938930219621e-06 -5.22362839337094e-06 -5.26270715341434e-06 -5.28920762120520e-06 -5.28479983942088e-06 -5.34172474221797e-06 -5.22717612139269e-06 -5.20314832822807e-06 -5.24013070017282e-06 -5.43799718960251e-06 -5.43412693551289e-06 -5.45858475339959e-06 -5.50492025712232e-06 -5.48481646690506e-06 -5.42197866239572e-06 -5.42353752087345e-06 -5.43600832255097e-06 -5.52658289608058e-06 -5.51690727283137e-06 -5.41617329020160e-06 -5.41515197559490e-06 -5.52873305121873e-06 -5.53002313061791e-06 -5.42267746815339e-06 -5.33978963365147e-06 -5.44245873969728e-06 -5.45138180379219e-06 -5.49997492391736e-06 -5.48589151941974e-06 -5.50212507459059e-06 -5.49427706897414e-06 -5.41294808602362e-06 -5.47320572027297e-06 -5.53480718404686e-06 -5.57582106855960e-06 -5.51615472885835e-06 -5.47497957994393e-06 -5.58028260548941e-06 -5.59968761060948e-06 -5.48556900608788e-06 -5.45277938759969e-06 -5.58205645126603e-06 -5.60253653948927e-06 -5.66655691880590e-06 -5.73536135294201e-06 -5.62634933045323e-06 -5.66661064980999e-06 -5.71434373612397e-06 -5.76299062783483e-06 -5.71434373874723e-06 -5.70235670500012e-06 -5.50787667035274e-06 -5.46277751425852e-06 -5.43772839801462e-06 -5.49228815542689e-06 -5.61296470280075e-06 -5.68424178318152e-06 -5.70343176567384e-06 -5.70740951854130e-06 -5.64140027568978e-06 -5.64983958052105e-06 -5.54808427913237e-06 -5.58888314248457e-06 -5.69805642928122e-06 -5.63000454665461e-06 -5.66021399927151e-06 -5.75186364900393e-06 -5.59538731929230e-06 -5.57603607368943e-06 -5.51475710522887e-06 -5.46992672665820e-06 -5.42203239891019e-06 -5.54211762875043e-06 -5.56582290556767e-06 -5.41988225341455e-06 -5.40923906089805e-06 -5.47949483705825e-06 -5.51271447930229e-06 -5.55770612593648e-06 -5.55362086525713e-06 -5.42934286632973e-06 -5.40214361208860e-06 -5.48917046629352e-06 -5.50965055040005e-06 -5.47433453479784e-06 -5.47707595957126e-06 -5.49132061153509e-06 -5.40993786088237e-06 -5.41332432036094e-06 -5.29431416253087e-06 -5.27603798331231e-06 -5.29839942415794e-06 -5.34156346257886e-06 -5.24228081786113e-06 -5.42654768330477e-06 -5.34215474508166e-06 -5.41687204660465e-06 -5.47632337748322e-06 -5.48153746558058e-06 -5.45068299949198e-06 -5.39633825335762e-06 -5.38612509951272e-06 -5.35844205100384e-06 -5.32538366340842e-06 -5.41020661741338e-06 -5.46353006578526e-06 -5.39762831694138e-06 -5.43170802282690e-06 -5.48750412420699e-06 -5.58592669808638e-06 -5.47266815048819e-06 -5.48422516113002e-06 -5.55517972822541e-06 -5.60221399654449e-06 -5.53330205540489e-06 -5.61941509905129e-06 -5.63973390081090e-06 -5.64484049731144e-06 -5.50051243706660e-06 -5.51163939563723e-06 -5.64742063527922e-06 -5.67209347237735e-06 -5.65935390806408e-06 -5.69321858724285e-06 -5.75600263829014e-06 -5.60199897405416e-06 -5.67392109252045e-06 -5.72627696597894e-06 -5.73917781511763e-06 -5.60646052156519e-06 -5.66037523413921e-06 -5.78691089727002e-06 -5.87200260678621e-06 -5.91328528246058e-06 -5.87151883828506e-06 -5.83856795714906e-06 -5.92817497437017e-06 -5.93548546080599e-06 -5.87463653247661e-06 -5.95171899243511e-06 -5.90527599552075e-06 -5.89038629121416e-06 -6.00176343514282e-06 -6.02229725693547e-06 -5.94650491219471e-06 -5.89452530534357e-06 -5.97262907333676e-06 -6.02057716567032e-06 -6.04498124095891e-06 -6.03208041594050e-06 -5.94682742660133e-06 -5.94021573897517e-06 -5.93887191530283e-06 -5.94102205038252e-06 -6.02122223213133e-06 -6.04460497129116e-06 -5.98079960094166e-06 -5.98638996177472e-06 -5.97160775038871e-06 -5.93978570037840e-06 -5.92365965538281e-06 -5.99300163095193e-06 -5.98380978432889e-06 -5.92790620375100e-06 -5.99461424769442e-06 -5.93419534918941e-06 -6.02165222926862e-06 -6.01299793575300e-06 -5.93811936362023e-06 -5.90828615975766e-06 -5.93360404113511e-06 -6.02901645418901e-06 -6.03584313832001e-06 -5.93795810062678e-06 -5.98472359793705e-06 -5.96961887017841e-06 -5.88667726268544e-06 -5.80368192148849e-06 -5.96730746492287e-06 -5.93822686062853e-06 -5.87082001436852e-06 -5.76428063705576e-06 -5.87092750557774e-06 -5.89780422693046e-06 -5.87452896794551e-06 -5.84560961592563e-06 -5.86383203687022e-06 -5.86883110040176e-06 -5.79900536909068e-06 -5.62871440880852e-06 -5.70730194727375e-06 -5.75465876148963e-06 -5.74019908689073e-06 -5.68365044479493e-06 -5.67375979188971e-06 -5.55292201665917e-06 -5.51669217414419e-06 -5.55990995613614e-06 -5.52545400363319e-06 -5.62414535693739e-06 -5.63699243407591e-06 -5.61366342725965e-06 -5.52647532400086e-06 -5.56791923235924e-06 -5.47643083322858e-06 -5.51421952363263e-06 -5.57850864807533e-06 -5.47385065725829e-06 -5.43380433448031e-06 -5.39440303078793e-06 -5.41144287840893e-06 -5.38660877189569e-06 -5.41380802976399e-06 -5.48384879665080e-06 -5.41638820914534e-06 -5.38671629078859e-06 -5.40730386648816e-06 -5.30447349745795e-06 -5.43719078711484e-06 -5.51502580678293e-06 -5.48771904289687e-06 -5.53082931059948e-06 -5.46616389569207e-06 -5.40246604300234e-06 -5.37757819159447e-06 -5.40472368411455e-06 -5.45261803233513e-06 -5.50153368259830e-06 -5.53996739725791e-06 -5.51868103201207e-06 -5.48573016045100e-06 -5.49051420912711e-06 -5.51776721149034e-06 -5.44364119736049e-06 -5.49637334843401e-06 -5.53265693099902e-06 -5.38429736696079e-06 -5.44557630521909e-06 -5.41886085768137e-06 -5.38236222899405e-06 -5.54227879254047e-06 -5.46600263042054e-06 -5.33393037886201e-06 -5.38112591902652e-06 -5.53620465056360e-06 -5.53953737157883e-06 -5.60194514620983e-06 -5.62382279330292e-06 -5.52174497885962e-06 -5.51626211712965e-06 -5.53529083301262e-06 -5.63322963991197e-06 -5.54071991641543e-06 -5.58560406969271e-06 -5.63355217003026e-06 -5.68746687557798e-06 -5.72557809683548e-06 -5.74681070721292e-06 -5.64758181411515e-06 -5.58587283921792e-06 -5.59103316279369e-06 -5.59452712927172e-06 -5.60603037701969e-06 -5.71982645180166e-06 -5.76116286029805e-06 -5.56189878136957e-06 -5.51217684179510e-06 -5.60495531357065e-06 -5.54496644009520e-06 -5.48212863528228e-06 -5.50255496359689e-06 -5.54034364085478e-06 -5.45089788056670e-06 -5.40579871851138e-06 -5.38687753161319e-06 -5.41493683351232e-06 -5.37870699108488e-06 -5.41278667278869e-06 -5.41622688537485e-06 -5.40789511160194e-06 -5.40655128493490e-06 -5.28942248836993e-06 -5.28802488676584e-06 -5.38639371567867e-06 -5.32817871775360e-06 -5.37413793933207e-06 -5.49314810275190e-06 -5.60027874194595e-06 -5.51416569761865e-06 -5.49717959556793e-06 -5.49830841283345e-06 -5.52615270040722e-06 -5.47696830588858e-06 -5.47578572834985e-06 -5.52685149816945e-06 -5.52830283605021e-06 -5.48046225678601e-06 -5.50406003821635e-06 -5.48132234015409e-06 -5.47626951443504e-06 -5.49879219744894e-06 -5.51094047971048e-06 -5.46111102002430e-06 -5.40735755043941e-06 -5.34258462523545e-06 -5.37618055541577e-06 -5.31216017130203e-06 -5.33242524377630e-06 -5.31866435529325e-06 -5.29350775144891e-06 -5.23615280476852e-06 -5.22927234832385e-06 -5.16546699306750e-06 -5.05258472615354e-06 -5.11477747260567e-06 -5.05064959284116e-06 -5.04629556415876e-06 -4.99367090607053e-06 -4.99195080382841e-06 -5.00802308521128e-06 -4.94948558628495e-06 -4.90954674975368e-06 -5.04043642972469e-06 -5.02199898248048e-06 -5.00205645122296e-06 -5.17057355603148e-06 -5.03188963268342e-06 -5.00490538855339e-06 -4.96502032574281e-06 -4.97372837921458e-06 -4.95727982838450e-06 -4.93362828929532e-06 -4.97888870877928e-06 -5.00555042632034e-06 -4.97792113779404e-06 -4.89793598556043e-06 -4.94717416063484e-06 -5.00538917849674e-06 -4.92266259450500e-06 -4.92148001217477e-06 -4.96383773060392e-06 -4.84783775858551e-06 -4.78327985632729e-06 -4.84267743862670e-06 -4.88928168484461e-06 -4.91642718735649e-06 -4.74748006614417e-06 -4.84181737893114e-06 -4.81752080739420e-06 -4.67174142447862e-06 -4.73726688321590e-06 -4.79139662959378e-06 -4.82171360391750e-06 -4.83284057642901e-06 -4.84751526526804e-06 -4.87423073209731e-06 -4.85805093797883e-06 -4.75419925031973e-06 -4.85901850328573e-06 -4.91680347130784e-06 -4.88702405057843e-06 -5.09010462494739e-06 -5.22943359438442e-06 -5.19755778815083e-06 -5.12165789218515e-06 -5.06349664591349e-06 -5.07892390279114e-06 -5.15794149654972e-06 -5.15084602720091e-06 -5.21733906443099e-06 -5.26329827367789e-06 -5.24475333813980e-06 -5.24991366982997e-06 -5.27507028143886e-06 -5.25593406205597e-06 -5.38698498660486e-06 -5.33828435751415e-06 -5.36064579501660e-06 -5.28625100220416e-06 -5.30909623196335e-06 -5.36155962445233e-06 -5.37048268528820e-06 -5.39983206064599e-06 -5.35403411039474e-06 -5.39950954893382e-06 -5.47508692543759e-06 -5.37967452378114e-06 -5.46170229426191e-06 -5.52717401615887e-06 -5.56716659578404e-06 -5.45777829252873e-06 -5.36446228660623e-06 -5.38768378185095e-06 -5.39311288226295e-06 -5.36634366191503e-06 -5.36182836931477e-06 -5.31124636241299e-06 -5.34328344474290e-06 -5.42127969859080e-06 -5.42832139675068e-06 -5.35763559895865e-06 -5.33210270749199e-06 -5.35575422844336e-06 -5.29528158619511e-06 -5.31769678958663e-06 -5.34602484810977e-06 -5.30888121573785e-06 -5.29893681843310e-06 -5.19788030754737e-06 -5.22104804554750e-06 -5.12880710066183e-06 -5.09795261449947e-06 -5.16810087623664e-06 -5.20223431856199e-06 -5.09064212910719e-06 -5.02087015275136e-06 -4.96851428050948e-06 -4.85364312718931e-06 -4.83300179394795e-06 -4.89718342050124e-06 -4.92508148640287e-06 -4.85676082430702e-06 -4.83794711619449e-06 -4.86294246280772e-06 -4.89460325754852e-06 -4.70802499026627e-06 -4.76382106350249e-06 -4.83284052123499e-06 -4.90298879405879e-06 -4.91798601239289e-06 -4.85235303418556e-06 -4.87261808551720e-06 -4.76091841079235e-06 -4.79585815232190e-06 -4.86466258024554e-06 -4.86460882068290e-06 -4.78951523683887e-06 -4.75199532056575e-06 -4.71931322898312e-06 -4.79327798466120e-06 -4.71619551789174e-06 -4.80789892524642e-06 -4.68243834487953e-06 -4.68781369752333e-06 -4.72484981960907e-06 -4.74946890673868e-06 -4.66029190898965e-06 -4.52725210708961e-06 -4.49456999970155e-06 -4.54611956179680e-06 ]
prominence_factor_localp2p = 0.0000004;
figure;
subplot(2,1,1)
findpeaks (data,'MinPeakProminence', prominence_factor_localp2p);
subplot(2,1,2)
findpeaks (-data,'MinPeakProminence', prominence_factor_localp2p);
Try
[x,y] = ginput(1) % Returns x and y after one mouse click
if you want to get one peak or:
[X,Y] = ginput() % Returns X=[x1..xN] and Y=[y1..yN] after N clicks, stop with ENTER
if you want to get multiple peaks in vector format
Unfortunately, I don't have the Signal Processing Toolbox (findpeaks is part of the SPT) so I'll answer this without it.
Say you have a function:
x = sin(linspace(0, 2*pi, 1000)) + 0.1*rand(1, 1000);
plot(linspace(0, 2*pi, 1000),x);
This gives be the following plot:
Now, using the function "Data Cursor" ,
you can select a point on the plot by clicking at it. You can drag the data tip around if you didn't hit the correct point at the first try. If you right click on the frame that comes up, you can export the [x,y] values to the workspace:
This gives the following variable (struct) in the workspace:
peak_value_1
peak_value_1 =
Target: [1x1 Line]
Position: [1.5849 1.0984]
DataIndex: 253
Now you have the positions of the maximum point:
position = peak_value_1.Position
position =
1.5849 1.0984
How you want to proceed from here is your call. Note that you can create multiple data tips by holding the Shift button while clicking.

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 plotyy y grid not showing up?

The y grid is not showing up.
I am sorry for pasting my data here, but the randomly generated data won't reproduce the error.
MWE
x = 1:188;
y1 = [2.28625413745400e-06 2.75754117520236e-06 7.28685404437484e-06 0.000162724777360761 0.000221525521386474 0.00513896494125896 0.00604630901473093 0.0239972210208572 0.0299094578291452 0.0379598701078280 0.0407471655008175 0.0424981277377004 0.0593685291574623 0.0720049840827008 0.0764805090392905 0.0784745326633472 0.0860462823212269 0.0872332599512308 0.0975548852352724 0.109523883880442 0.110064605012806 0.113809401352047 0.124266280105196 0.127737254184620 0.131994354266289 0.136382231740752 0.140780372613597 0.148025152077524 0.153450613217859 0.160350058677122 0.162287760596164 0.167560245835870 0.172287619094450 0.179483652830590 0.182889254147371 0.186973131314099 0.191625297613997 0.196138973204891 0.207290820972041 0.228336575919158 0.230665358213673 0.235638857454267 0.235734235774472 0.238705757714335 0.239622986776577 0.242413675960620 0.246310296615708 0.253736977688068 0.263526753327344 0.267765132710984 0.278657792038674 0.279655691920331 0.288031520555191 0.293324147563905 0.296311756729307 0.299954886375481 0.321017342659284 0.326834183424333 0.330097266880667 0.335595881759988 0.336496847040177 0.340794306395668 0.341629365670475 0.346388406232711 0.349275143228649 0.354280512324743 0.354379434267694 0.358138289571028 0.362194170593214 0.362900354379436 0.369051901571130 0.377532832423029 0.378473844107997 0.381395220201511 0.382513829911048 0.384054832987647 0.386163845331814 0.392189611831563 0.394741141959399 0.397482463354943 0.405159848615709 0.405380894697897 0.407164071630765 0.409960356496890 0.410899112960204 0.412540848976194 0.413785128363002 0.416497765056847 0.416620870255991 0.423339554321434 0.432715687900691 0.433645605363207 0.438315853796267 0.440811877583745 0.442254706117630 0.444715767486113 0.446534290546266 0.453869137753388 0.460480289492812 0.462635871995806 0.469200485794422 0.477953684933473 0.480327971284933 0.483328013787908 0.485165999667700 0.488810058710477 0.492434498347716 0.495633702966921 0.496950612281433 0.499449682429962 0.500216965521911 0.500846991265055 0.500928755463801 0.509072082345426 0.510390618618367 0.513193477753814 0.516094965483328 0.519766464957800 0.526453403933161 0.531012377098381 0.537398002662492 0.549302962968306 0.551182949653050 0.552379404338828 0.556210298953147 0.556753658102025 0.559775602234047 0.565600556439014 0.575345977188816 0.582325671082393 0.583274992838168 0.590277452190722 0.600455666337237 0.602008898724798 0.603153938447889 0.613158002706088 0.613885424973209 0.616753470151396 0.628020233091089 0.628074985975907 0.628789310134612 0.630860799827951 0.636442699017899 0.636900946176369 0.637731827970055 0.645063295538950 0.651395391970488 0.661823925726547 0.667492404940707 0.668956876509558 0.669721721712489 0.671361974997858 0.671885436140652 0.680929118840636 0.682908071014682 0.686054230901812 0.686999320186044 0.694779340677743 0.696700705717762 0.703712091209040 0.703869695474697 0.709425231090181 0.724246955883888 0.726713348504891 0.728662080945891 0.732212616777790 0.733176807633189 0.763720671816572 0.765840614187905 0.770399497782647 0.770434651768652 0.792235782237051 0.807184100825349 0.810885623037136 0.811134923493633 0.815243002846112 0.841422843749966 0.861314574636162 0.878517027205137 0.892431499196981 0.942320011798269 0.964745715565426 0.977151781479271 0.988013718634144 0.999972717897711 0.999990949120295 0.999997802101236 0.999997876591522];
y2 = [3294.33837529196 2729.78695657567 2310.42151540182 3261.53933401261 3665.60437426496 2581.47975105179 3286.49864759154 2978.24371790368 4481.99722565735 2800.21030230662 2301.25805253203 2863.33415937793 1958.80234681204 2487.66423766389 3829.37164321518 2868.93021805668 2669.26931138609 2653.62428904136 3222.63130681970 2318.46261983033 2338.28118053869 3420.09701187000 2619.37694067421 3639.34394329064 2542.70875166783 2702.39831536651 2510.69621735271 2267.65044087156 2467.31789304366 2062.46609266725 3373.03272133488 2197.75665691969 2826.13630193704 2236.19499536199 2323.13168705560 3066.53020217878 3068.54949312690 3426.80837351058 3314.30473826970 2536.37810854444 2884.52696903199 2276.44108414871 2395.79431323859 2455.23706941821 2556.54900792254 3287.41337734157 3049.78318859226 2137.34736327310 2734.56065425968 2092.28587548994 2220.94669832315 2576.25273881808 2936.79720507286 3252.22901487077 2354.99925954856 3118.56428955851 2739.08882274580 3037.83300416419 2767.32993139568 2651.17282634850 2126.70682501162 2208.11204840368 2463.12421246333 2788.29925791802 2931.86717632459 1672.90126196404 2200.27471694257 2629.79309139237 2871.88047431798 2771.11497975924 3306.15504624950 2615.51614159686 2104.52375632588 2522.81762261438 2553.64540775560 2664.61027658776 3214.62846184114 2681.73004190842 2854.46880173160 2947.77021172908 2843.58809148613 2970.81524997654 2517.75645078039 2665.88205361855 2972.47722717208 2775.93754320540 3230.01088619321 2093.71452074073 2250.27329605820 2456.05859503165 2998.17131690415 2464.61113820404 2014.42482269388 2513.46818136650 2792.53181675715 3174.78812406346 2701.20264878804 2389.85439304729 3289.42797312716 2295.43987736403 2611.53215270973 3740.71494210077 2462.96252295280 3832.67982476584 2645.28910431242 2405.15899417202 2731.28933338260 2855.62677715298 2323.21533050664 2636.33997756180 2503.20033540276 1748.70147375294 3349.86556128063 2497.65649660493 2271.69261389125 2336.03524355220 2473.18519446995 2266.88488232443 2409.51158095881 1734.14451377117 2514.18757679797 1975.25093236641 2958.72678659639 2429.83473700471 2498.28210099667 2055.42730670745 2408.13320127252 2849.86545528969 2079.01473466442 2035.08193677459 2309.55127919543 2846.16370840958 2395.13215085459 2549.68177442072 2765.86512891974 2724.23809140675 2264.77498971179 2439.87393419107 2055.88468587720 3146.12025364587 2648.24057514780 2332.28994336700 2420.02188205959 2748.73933350174 2447.73770315806 2356.97937091099 2381.15677251297 2567.93916714385 2587.53026732683 2667.30106970822 2660.47433323455 2163.50645008963 2309.40075292939 2312.40421976050 2166.40731989119 2082.28556641993 2745.06117055910 3486.90007765939 1987.74834763183 2485.62389820632 2337.31198380922 1901.20002732537 3112.71557200479 2498.59172261308 2984.01432790167 2793.37859308815 2857.77785197779 2571.67750419978 1876.49080511373 2003.31154773529 2517.62947444061 2929.54702726817 3099.39521514734 3849.11548253558 2114.99710879081 2851.38969242251 1770.21298408528 2570.79519973382 2861.78434546229 3136.05338342104 2007.19612886364 1759.16533204181 2521.93259475353 2206.81633306099 2035.72855620751 2017.41126163408 2228.99620986991 2314.02003648875];
[hAx, hLine1, hLine2] = plotyy(x, y1, x, y2);
hAx(1).XGrid = 'on';
hAx(1).YGrid = 'on';
hAx(2).XGrid = 'on';
hAx(2).YGrid = 'on';
Use:
plotyy(x, y1, x, y2);
grid on;
ha = findobj(gcf,'type','axes');
set(ha(1),'ytick',linspace(0,5000,5));
set(ha(2),'ytick',linspace(0,1,5));
you can mess around with the linspace, i just looked at the max values and chose 5 tick marks

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).