clear
clc
warning off
nntwarn off
global p % Training input of data
global t % Training output of data
global R % The number of input node
global S2 % The number of output node
global S1 % The number of hidden layers node
global S % Encoding length
S1=7;
day=[
24.28050041 79.18664551 118.7556229 0.498066664
24.27223969 79.11182404 107.4616165 0.453699917
24.32404137 79.12751007 113.1695709 0.483233273
24.28742981 79.02813721 119.4852142 0.522066772
24.29614639 78.63471985 124.2647552 0.548966765
24.44758797 77.61372375 123.2032242 0.555933356
24.5573349 75.72170258 133.1891327 0.597466707
24.71410561 75.81557465 151.4627838 0.67566663
24.79006767 73.11479187 169.4704132 0.749633372
24.90089226 72.61096191 176.5809174 0.782366931
25.03055954 71.96666718 161.6261444 0.697733402
25.05233383 70.77360535 134.8908539 0.600666761
25.07719231 71.31375122 136.8597565 0.641833305
25.19164848 70.52310944 149.4885712 0.729600012
25.29346275 69.68406677 160.9412384 0.81126672
25.44688034 68.67297363 168.1025848 0.882033348
25.60445404 65.91831207 185.1776276 0.970600069
25.74345016 64.28778076 212.1323547 1.094433427
25.86354637 63.09873199 226.2109528 1.161266565
26.0164547 63.28351974 237.5073547 1.208199978
26.09581757 60.10884094 239.8231812 1.193166733
26.22686195 58.52819061 250.0517273 1.229533315
26.39403152 56.94085312 257.771759 1.269633651
26.42829514 55.34542465 250.2635498 1.233933449
26.49137497 54.0851593 234.5327148 1.120566726
26.54426193 54.70727921 223.725235 1.053766608
26.50731087 53.55802155 215.5336304 1.01933372
26.42572403 52.25370789 212.4824524 0.556166649
26.43495941 52.74851227 210.2404633 1.031600118
26.44470978 53.16724396 228.1355286 1.151333332
26.57367516 54.28215408 266.3484192 1.397633553
26.65934563 52.6730957 328.9782715 1.674700022
26.80798531 51.54441071 377.1354675 1.886999965
26.97813797 50.69446945 411.3053589 2.02246666
27.07191086 51.11526489 394.967041 1.902066946
27.11913872 51.00314713 378.4665222 1.81556654
27.0648098 49.77826691 329.460144 1.595699906
26.8507061 50.18064499 280.3239441 1.349666595
26.78201103 50.40595245 230.4190521 1.123233438
26.7053833 50.91542816 195.2900696 0.946866691
26.47287369 50.59962845 184.5733795 0.901999712
26.42066765 51.92476273 182.5689392 0.942266643
26.31132507 51.17784882 186.7106934 1.005866766
26.26443672 51.77466965 191.8409729 1.056366682
26.33745766 51.60219193 206.1300964 1.162166715
26.35835075 51.94431686 217.2509308 1.210532904
26.32790756 51.76330566 219.2840881 1.198300123
26.3177166 51.44794083 215.0214691 1.153099895
26.38223457 51.89785767 218.2433319 1.181799889
26.37432671 51.58493805 240.7233124 1.29396677
26.38178635 51.38508987 245.8151703 1.339000106
26.39197159 50.84028625 222.4656067 1.207066774
26.45825195 51.78571701 202.6178894 1.097766876
26.44766617 51.99055862 203.1655121 1.11193347
26.43800354 51.35631943 216.8106995 1.173566461
26.52618027 51.75653839 249.3805542 1.338066816
26.63396835 51.31529617 310.6481628 1.672133446
26.87471771 50.25273514 404.2271729 2.145466805
27.0619812 49.78366089 435.0804138 2.22943306
27.18972206 49.6987114 400.6725769 2.025033236
27.17947769 48.89620209 370.0925903 1.879766703
27.34130478 49.67166901 350.4265137 1.77126646
27.24031258 48.15761948 341.8634033 1.715699911
27.25878525 49.46030426 310.7502747 1.547966719
27.25364494 49.23001862 270.9058228 1.348400116
27.31886864 49.10357666 255.4367218 1.276366949
27.29960442 48.69763565 257.0721436 1.283666849
27.35587883 48.12913513 258.3891602 1.285300255
27.37311172 49.07977295 264.6256409 1.323566914
27.56619453 48.98254776 285.3045044 1.456800222
27.71939468 47.78519821 324.8666992 1.623933434
27.82408333 47.49826431 324.4099426 1.657200098
27.89593315 44.33027649 346.0310364 1.719133258
27.87083054 44.58435822 372.7935791 1.806600094
28.04133987 44.00107574 388.5400391 1.891766429
28.19401169 43.99151611 408.8988647 1.943599939
28.29953194 43.90049744 413.5083313 1.975699902
28.43052864 43.91506195 403.4325867 1.933799744
28.41594315 44.04820251 404.2919922 1.939799786
28.28216934 43.50780106 406.6621704 1.954833388
28.32046318 42.4900322 409.1258545 2.007300138
28.45454216 39.88251877 402.2788086 1.958899856
28.4075222 39.00549316 347.043457 1.734066606
28.15978622 38.8223381 321.3888245 1.645599961
28.11158752 40.7170105 294.5761108 1.541666746
28.01202583 41.44154739 263.4663696 1.392133355
27.90885735 42.52125931 234.8515015 1.250733256
27.88067436 42.77763367 225.9827728 1.197733402
27.96011734 44.53651428 217.9984283 1.182066798
28.04746819 44.20440292 216.4160614 1.176333427
27.96260071 43.97782135 215.8672485 1.165999889
27.90514183 43.09642029 214.018158 1.12016654
27.82632256 42.52378082 196.356369 1.012599945
27.7298851 43.99860382 175.1489258 0.919699967
27.54187202 46.0278244 168.1703796 0.896333218
27.4248848 47.13049316 172.3992004 0.949566603
27.48268318 48.40256882 176.6352234 0.973933041
27.49634171 46.94930267 173.4142914 0.945366919
27.5682373 48.36986542 174.7704163 0.954133391
27.55034637 46.44143295 190.6651764 1.018399835
27.34321785 46.05998993 222.8886719 1.14989996
27.1866436 47.33358765 224.2975006 1.174733281
27.11196518 46.88286591 225.9067841 1.168266535
27.19867325 47.51460648 218.6845093 1.117533445
27.27124023 46.62280273 198.0573578 1.022866845
27.29561043 41.92557907 206.3654022 1.040600061
27.37500572 40.11426163 208.9455109 1.047233224
27.46160889 37.86567307 199.7579803 0.984999895
27.52156067 35.04897308 180.5132751 0.895766735
27.49451637 35.36354828 152.0746613 0.744033277
27.47008133 34.28634262 127.8432541 0.626266599
27.43127823 34.1671524 135.4795837 0.648999929
27.43634796 34.77727127 129.2401276 0.625533402
27.41415215 35.39227676 132.7928772 0.632966638
27.44505119 34.91461563 144.0890198 0.686066747
27.48186684 34.26789856 156.5846405 0.731899917
27.54559326 33.27069092 177.1872253 0.798900008
27.66314125 33.23147202 179.1457062 0.79123342
27.67827988 32.90933228 166.7539978 0.729199886
27.68239403 33.7563324 170.4609222 0.734399796
27.6997776 34.31102753 175.8219757 0.755166709
27.69321251 34.51104355 179.6665649 0.775933504
27.65049744 34.15050888 181.9151764 0.781933427
27.65460205 34.27260208 179.3563843 0.758300126
27.64368057 34.20838165 168.7386322 0.693333328
27.62020683 33.80288315 145.2731171 0.609966695
27.57923508 33.76939011 120.8905945 0.498099953
23.80328178 40.87190628 216.4523773 0.867566705
24.11731911 39.82992554 290.9891357 1.122133255
24.58344841 39.61910248 383.49823 1.406733394
25.10544586 37.73310852 434.6317444 1.48269999
25.50841331 35.54430008 511.2724304 1.713433266
25.50797844 34.82181168 518.494873 1.685933352
25.52458572 34.77636719 498.5513611 1.61833334
25.83768845 34.66270065 522.3195801 1.767966747
25.61034393 33.76692963 525.5199585 1.810300231
25.59073067 34.50308228 530.4434204 1.880966544
25.8288765 34.09539795 537.8617554 1.977800012
25.96798134 33.75762177 551.5286255 2.073166847
26.14006233 33.77230072 566.9072266 2.158566475
26.29462051 33.28136063 582.7714233 2.251199961
26.48658371 33.28824615 599.8665771 2.34523344
26.40672684 33.00135422 619.6931152 2.440366745
26.34298897 32.58191299 649.7443237 2.548333168
26.37631607 32.86426163 675.0268555 2.662166834
26.32065773 32.28416061 699.9804688 2.767533302
26.50395584 33.02454758 720.4613037 2.884666681
26.58927536 32.56749344 759.9023438 2.993866682
26.6351223 31.99308586 801.9562378 3.130699873
26.53711319 31.79697418 819.8499756 3.216300011
26.57437134 32.00128937 837.5106201 3.31739974
26.76950264 32.64682007 851.0357056 3.358999968
26.84590721 31.69948959 881.6373901 3.491433144
26.8217926 32.23370743 898.71698 3.578233719
27.01216507 31.72943687 942.8889771 3.734600067
27.08035088 31.42481232 946.8623047 3.66103363
27.1925106 31.24445343 910.4447021 3.731033325
27.24360275 31.41804123 973.4540405 3.860200167
27.623603