Commit 3d7a247d authored by Marc van Wanrooij's avatar Marc van Wanrooij

Remove some third-party functions

parent d5bd1999
No preview for this file type
model in "/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/pearson.txt"
data in "/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/tmpjags/jagsdata.R"
model in "/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/pearson.txt"
data in "/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/tmpjags/jagsdata.R"
compile, nchains(1)
parameters in "/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/tmpjags/jagsinit1.R"
parameters in "/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/tmpjags/jagsinit1.R"
initialize
update 500
monitor set r, thin(1)
monitor set mu, thin(1)
monitor set sigma, thin(1)
update 1000
coda *, stem('/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/tmpjags/CODA1')
coda *, stem('/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/tmpjags/CODA1')
model in "/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/pearson.txt"
data in "/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/tmpjags/jagsdata.R"
model in "/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/pearson.txt"
data in "/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/tmpjags/jagsdata.R"
compile, nchains(1)
parameters in "/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/tmpjags/jagsinit2.R"
parameters in "/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/tmpjags/jagsinit2.R"
initialize
update 500
monitor set r, thin(1)
monitor set mu, thin(1)
monitor set sigma, thin(1)
update 1000
coda *, stem('/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/tmpjags/CODA2')
coda *, stem('/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/tmpjags/CODA2')
model in "/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/pearson.txt"
data in "/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/tmpjags/jagsdata.R"
model in "/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/pearson.txt"
data in "/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/tmpjags/jagsdata.R"
compile, nchains(1)
parameters in "/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/tmpjags/jagsinit3.R"
parameters in "/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/tmpjags/jagsinit3.R"
initialize
update 500
monitor set r, thin(1)
monitor set mu, thin(1)
monitor set sigma, thin(1)
update 1000
coda *, stem('/Users/marcw/Gitlab/biofysica/bayesdataanalysis/regression/tmpjags/CODA3')
coda *, stem('/Users/marcw/Documents/GitLab/biofysica/bayesdataanalysis/regression/tmpjags/CODA3')
"x" <-
structure(c(-20,-17.5,-10,20,0,12.5,30,2.5,2.5,-47.5,27.5,65,30,42.5,-15,30,42.5,80,-30,15,-12.5,35,80,20,-30,32.5,-12.5,-30,-7.5,7.5,-47.5,47.5,-30,45,10,2.5,12.5,-52.5,7.5,12.5,-30,-27.5,60,7.5,-57.5,-2.5,-35,-27.5,-22.5,-12.5,32.5,0,-30,22.5,55,-20,55,27.5,-22.5,30,22.5,30,55,-52.5,35,15,2.5,25,-57.5,12.5,-35,-5,-52.5,-40,17.5,7.5,12.5,-30,-12.5,-37.5,-55,-45,-57.5,-10,30,20,17.5,0,42.5,-55,77.5,-30,12.5,27.5,42.5,-37.5,45,50,-35,55,50,12.5,-12.5,15,-12.5,60,77.5,-5,0,-52.5,-12.5,57.5,25,-2.5,-35,-17.5,15,20,-57.5,47.5,-40,-12.5,-30,-47.5,-47.5,27.5,-30,-5,-10,30,-10,57.5,-45,-7.5,30,-15,0,-10,12.5,10,0,-10,65,-5,-32.5,2.5,37.5,-12.5,55,57.5,-35,-32.5,-55,-7.5,-42.5,10,-7.5,32.5,75,20,10,-35,-2.5,20,55,-12.5,60,-52.5,17.5,-20,25,32.5,-2.5,-7.5,50,5,-12.5,-15,0,-12.5,57.5,22.5,50,25,25,25,-7.5,-27.5,75,40,-42.5,0,37.5,2.5,-2.5,-32.5,32.5,5,20,2.5,0,-37.5,50,-40,-15,60,10,30,2.5,25,-12.5,0,75,5,2.5,25,-12.5,-52.5,22.5,-39.3987,-8.07688,10.5324,3.52331,-13.3327,-22.9976,-3.11151,-24.1812,-4.93585,-11.5724,-26.2657,-0.451112,-18.1114,1.88874,0.579521,2.85886,4.35835,29.3152,16.7073,-1.87265,-25.1718,-15.3728,9.2973,-10.8501,-13.978,-26.5559,1.60489,-6.13861,-7.0193,0.266268,-30.3641,-2.9453,-6.15271,-0.652517,-16.2301,-33.6165,-12.6659,-14.6334,-17.1259,-16.7219,14.6091,-13.0333,-15.8421,-16.2081,-24.5075,-19.1866,-20.0043,-22.9089,-17.3437,-3.5043,-2.30439,-9.10372,-20.7654,-21.5223,-12.3937,-22.6816,-25.5243,-12.3904,-11.5762,-14.4439,-24.5463,-16.1462,-15.2946,-21.1247,-21.7438,-2.51029,-23.3128,-10.6727,-42.8169,-26.7216,-35.4868,-1.46901,-29.3807,-25.0366,26.284,-26.2958,-34.4054,22.0297,-24.9788,-15.7489,-35.476,-27.4754,-28.936,-31.1978,-29.2988,-20.9919,15.5295,-24.3376,-21.3885,-39.8085,-23.6465,-0.506097,-21.5546,-11.3979,-19.3269,-22.0684,-29.2629,-28.6664,-17.0246,-15.0951,-19.6316,-18.9454,-11.2073,-20.6205,-14.694,-2.30624,-21.3673,-15.6863,-14.1144,-25.7533,10.2505,22.8868,-29.9013,-29.7899,-22.1646,-11.6075,3.71787,-11.3287,-46.9597,-6.12762,-24.9951,-6.99221,58.2729,-35.0231,-26.2888,-25.4365,-17.2882,16.9206,-21.6139,-0.457926,2.36269,43.7024,-27.955,23.5787,-11.2792,0.899369,15.2175,24.6877,12.4997,-5.00396,4.19009,9.91739,-4.35892,-25.7789,-31.4349,-11.1351,-22.2323,-16.9672,13.9398,27.4792,-19.1861,-27.6085,-40.2197,2.77565,-37.4254,-16.4503,-26.7374,-2.35315,-12.7244,4.70849,6.70404,-41.2174,-20.1458,16.2281,6.31504,21.1387,19.6943,-23.1568,-20.9741,-20.6057,10.2013,-2.27961,-25.6309,-22.4482,20.4144,-30.46,-22.7869,-24.4391,-10.9321,-29.6469,20.2406,1.33731,25.2144,6.12749,10.2922,16.4908,-24.9684,5.73882,29.1478,3.6472,-11.8791,-12.6509,-8.30761,5.78634,-14.1204,-23.7502,-5.99952,-12.2682,14.8451,-0.246051,17.407,-13.4097,20.6455,-20.9345,-3.95082,20.3238,14.2075,-2.98219,19.2676,-15.8979,-9.72458,12.1964,21.8268,-22.2081,6.44671,19.0923,-9.67226,-3.11533,30.5029), .Dim=c(219,2))
structure(c(-90,-89,-88,-87,-86,-85,-84,-83,-82,-81,-80,-79,-78,-77,-76,-75,-74,-73,-72,-71,-70,-69,-68,-67,-66,-65,-64,-63,-62,-61,-60,-59,-58,-57,-56,-55,-54,-53,-52,-51,-50,-49,-48,-47,-46,-45,-44,-43,-42,-41,-40,-39,-38,-37,-36,-35,-34,-33,-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,-97.6602,-81.2203,-64.5679,-62.1745,-93.3141,-63.3787,-63.5,-74.3511,-83.4414,-82.4272,-68.4455,-44.5127,-71.8493,-70.2353,-79.2095,-63.6959,-54.3295,-38.3998,-61.291,-75.5593,-42.3212,-54.7528,-73.3085,-56.2683,-66.7041,-69.4648,-56.0598,-60.9934,-49.6309,-52.5837,-59.5053,-49.6076,-63.5387,-58.8587,-46.2405,-50.6616,-40.0531,-34.6298,-53.0836,-39.3582,-37.1092,-42.8938,-37.7112,-49.6543,-45.0258,-47.547,-29.4566,-26.0006,-21.5667,-35.0336,-39.5063,-29.3427,-33.2693,-35.2852,-40.5204,-36.5503,-29.0302,-39.1526,-31.2485,-24.7574,-33.7862,-14.946,-38.4237,-29.8152,-34.6533,-19.7174,-15.0011,-15.2318,-28.9308,-7.75685,-14.7004,-13.1506,-13.5567,-23.4718,-28.3879,-18.8393,-13.1221,-14.6368,-2.2288,-10.7658,-8.02094,-4.6204,-15.7628,0.610304,5.88852,9.8047,4.9224,14.2484,4.24081,3.15187,3.09615,7.87796,5.969,-1.18723,0.334331,-3.14481,-6.08588,15.2522,10.9144,6.17872,7.7713,17.4088,12.609,10.4121,-2.88755,22.5619,21.3311,25.234,8.34395,21.5754,19.6934,18.7351,32.77,19.7414,32.0728,16.7759,25.0657,16.0854,14.0893,17.4617,35.0365,32.1241,37.4356,11.9327,21.8468,34.4739,29.2818,35.113,44.4913,40.1199,9.23227,54.4369,32.2271,36.4992,55.3335,33.0169,35.6246,45.5493,23.7658,46.9321,35.4444,25.5753,25.4311,47.815,57.3894,63.7679,59.0744,53.5513,52.5625,55.967,62.9069,35.0701,48.5675,74.1174,55.0973,60.444,71.0087,62.1222,67.1225,57.3471,55.1149,66.4329,79.8852,48.0867,60.4316,56.0986,99.0811,74.2144,68.7301,61.6873,84.1144,61.2338,78.3403,50.4473,74.0247,93.5892,66.453,66.3253,66.4489,82.3592,78.1066), .Dim=c(181,2))
"n" <-
219
181
This diff is collapsed.
650 3.7351 0.3869 4.9308 2.5018E-08
651 3.7039 0.3793 4.8939 2.5198E-08
652 3.6727 0.3722 4.857 2.60979E-08
653 3.6414 0.3659 4.8083 2.59179E-08
654 3.6126 0.3601 4.7595 2.64579E-08
655 3.5841 0.3545 4.7045 2.5378E-08
656 3.5555 0.3495 4.6495 2.59179E-08
657 3.5269 0.3451 4.5893 2.5558E-08
658 3.4982 0.341 4.5291 2.86177E-08
659 3.4695 0.3376 4.4652 2.75378E-08
660 3.4408 0.3346 4.4012 2.98776E-08
661 3.4062 0.3318 4.3331 2.98776E-08
662 3.3717 0.3294 4.265 2.93377E-08
663 3.3371 0.3276 4.1928 2.95176E-08
664 3.299 0.326 4.1206 2.86177E-08
665 3.2582 0.3245 4.0456 2.95176E-08
666 3.2174 0.3234 3.9705 2.95176E-08
667 3.1762 0.3227 3.8983 2.95176E-08
668 3.1327 0.322 3.8261 2.89777E-08
669 3.0891 0.3216 3.7529 3.00576E-08
670 3.0455 0.3213 3.6797 2.98776E-08
671 2.9993 0.3212 3.6073 2.91577E-08
672 2.9519 0.3212 3.5349 3.02376E-08
673 2.9045 0.3214 3.4635 3.07775E-08
674 2.8569 0.3214 3.3921 3.20374E-08
675 2.8087 0.3211 3.3224 2.98776E-08
676 2.7606 0.3208 3.2527 2.98776E-08
677 2.7124 0.3206 3.1841 3.07775E-08
678 2.6652 0.3205 3.1156 3.09575E-08
679 2.6183 0.3201 3.0562 3.09575E-08
680 2.5713 0.3194 2.9968 3.18575E-08
681 2.5248 0.3186 2.9496 3.29374E-08
682 2.4788 0.3181 2.9024 3.41973E-08
683 2.4329 0.3173 2.8623 3.29374E-08
684 2.387 0.3163 2.8223 3.25774E-08
685 2.3436 0.3157 2.7859 3.38373E-08
686 2.3004 0.3151 2.7494 3.47372E-08
687 2.2572 0.314 2.718 3.59971E-08
688 2.2162 0.3135 2.6866 3.67171E-08
689 2.1772 0.3126 2.6597 3.81569E-08
690 2.1382 0.3123 2.6328 3.6897E-08
691 2.0997 0.3122 2.6093 3.95968E-08
692 2.0656 0.3122 2.5857 4.04968E-08
693 2.0315 0.3123 2.5662 4.03168E-08
694 1.9974 0.3125 2.5468 4.10367E-08
695 1.9665 0.313 2.524 4.28366E-08
696 1.937 0.314 2.5013 4.53564E-08
697 1.9076 0.3148 2.4806 4.62563E-08
698 1.8791 0.3164 2.4599 4.67963E-08
699 1.853 0.3181 2.4376 5.0036E-08
700 1.827 0.3199 2.4154 5.12959E-08
701 1.801 0.3219 2.3922 5.0396E-08
702 1.7777 0.3243 2.369 5.09359E-08
703 1.7548 0.3269 2.3438 5.32757E-08
704 1.7319 0.3296 2.3185 5.41757E-08
705 1.7099 0.3323 2.2955 5.48956E-08
706 1.6887 0.3352 2.2725 5.66955E-08
707 1.6675 0.3386 2.2446 6.08351E-08
708 1.6464 0.3418 2.2167 6.1915E-08
709 1.6267 0.345 2.1889 6.2455E-08
710 1.607 0.3485 2.1612 6.56947E-08
711 1.5873 0.3524 2.1362 6.98344E-08
712 1.5677 0.3564 2.1112 7.10943E-08
713 1.5481 0.3602 2.0821 7.4694E-08
714 1.5285 0.3639 2.053 7.82937E-08
715 1.5093 0.368 2.0255 8.22534E-08
716 1.4907 0.3724 1.998 8.54932E-08
717 1.4721 0.3765 1.9736 8.89129E-08
718 1.4535 0.3807 1.9492 9.39525E-08
719 1.4365 0.3854 1.9274 9.93521E-08
720 1.4197 0.3899 1.9055 1.00972E-07
721 1.4029 0.3943 1.8879 1.06551E-07
722 1.3875 0.3988 1.8703 1.11951E-07
723 1.3733 0.4035 1.8578 1.17171E-07
724 1.3592 0.4083 1.8453 1.1987E-07
725 1.3456 0.4133 1.8357 1.2725E-07
726 1.3352 0.4181 1.8261 1.33009E-07
727 1.3249 0.423 1.818 1.40749E-07
728 1.3146 0.4281 1.8099 1.47588E-07
729 1.3081 0.4332 1.8058 1.54968E-07
730 1.3029 0.4383 1.8017 1.63967E-07
731 1.2976 0.4435 1.801 1.74406E-07
732 1.2946 0.4488 1.8004 1.84485E-07
733 1.295 0.454 1.7999 1.95644E-07
734 1.2953 0.4593 1.7994 2.04644E-07
735 1.2959 0.4646 1.801 2.12743E-07
736 1.3028 0.47 1.8026 2.19582E-07
737 1.3096 0.4754 1.8045 2.24982E-07
738 1.3164 0.4811 1.8064 2.29302E-07
739 1.3277 0.4865 1.8107 2.32181E-07
740 1.3411 0.492 1.815 2.36501E-07
741 1.3545 0.4976 1.8213 2.35781E-07
742 1.3697 0.5032 1.8275 2.36681E-07
743 1.3887 0.5089 1.8337 2.37581E-07
744 1.4078 0.5147 1.8399 2.38481E-07
745 1.4268 0.5203 1.8451 2.36141E-07
746 1.4501 0.5259 1.8502 2.35961E-07
747 1.4736 0.5317 1.8543 2.35421E-07
748 1.4971 0.5376 1.8585 2.34701E-07
749 1.5212 0.5436 1.8635 2.36141E-07
750 1.5458 0.5495 1.8685 2.33261E-07
751 1.5703 0.5554 1.8768 2.35061E-07
752 1.5938 0.5613 1.8851 2.35061E-07
753 1.6142 0.5672 1.8917 2.35241E-07
754 1.6346 0.5731 1.8983 2.34701E-07
755 1.6549 0.5791 1.9019 2.33441E-07
756 1.6646 0.5856 1.9055 2.31821E-07
757 1.6733 0.5912 1.9086 2.33261E-07
758 1.682 0.5974 1.9117 2.32001E-07
759 1.6816 0.6031 1.9148 2.30022E-07
760 1.6745 0.6096 1.9178 2.29482E-07
761 1.6674 0.6157 1.9206 2.29842E-07
762 1.6566 0.6219 1.9235 2.26962E-07
763 1.6343 0.6283 1.9285 2.25342E-07
764 1.6121 0.6345 1.9335 2.25162E-07
765 1.5898 0.6407 1.9391 2.24082E-07
766 1.5582 0.6469 1.9446 2.24802E-07
767 1.5259 0.6535 1.9498 2.23002E-07
768 1.4935 0.6596 1.9549 2.20842E-07
769 1.459 0.6658 1.9602 2.19042E-07
770 1.4229 0.672 1.9656 2.19222E-07
771 1.3869 0.6785 1.9705 2.17423E-07
772 1.3513 0.6849 1.9754 2.16163E-07
773 1.3169 0.6911 1.981 2.13283E-07
774 1.2825 0.6974 1.9867 2.12923E-07
775 1.2481 0.7038 1.9952 2.14363E-07
776 1.2175 0.7101 2.0037 2.10583E-07
777 1.187 0.7166 2.0155 2.07703E-07
778 1.1566 0.7229 2.0273 2.06803E-07
779 1.1298 0.7297 2.0387 2.06983E-07
780 1.105 0.736 2.05 2.05544E-07
781 1.0803 0.7422 2.0612 2.02844E-07
782 1.0571 0.7485 2.0724 2.01224E-07
783 1.0372 0.7549 2.0851 2.01044E-07
784 1.0173 0.7613 2.0979 1.97804E-07
785 0.9975 0.7681 2.1081 1.95644E-07
786 0.9822 0.7743 2.1183 1.92945E-07
787 0.9668 0.7808 2.1271 1.89885E-07
788 0.9515 0.7874 2.136 1.90965E-07
789 0.9385 0.7941 2.1433 1.89525E-07
790 0.9264 0.8005 2.1506 1.86465E-07
791 0.9143 0.807 2.1572 1.84305E-07
792 0.9034 0.8134 2.1638 1.83945E-07
793 0.8939 0.8197 2.1763 1.82145E-07
794 0.8844 0.8264 2.1887 1.80886E-07
795 0.8752 0.833 2.2015 1.76926E-07
796 0.8676 0.8392 2.2142 1.75306E-07
797 0.86 0.8458 2.2279 1.74406E-07
798 0.8524 0.8524 2.2416 1.73506E-07
799 0.8461 0.8588 2.2518 1.71166E-07
800 0.8399 0.8653 2.2619 1.72066E-07
801 0.8338 0.8716 2.2666 1.71166E-07
802 0.8285 0.878 2.2713 1.68467E-07
803 0.8237 0.8845 2.2762 1.69006E-07
804 0.819 0.8909 2.2812 1.68287E-07
805 0.8146 0.8973 2.287 1.67747E-07
806 0.8111 0.9038 2.2927 1.67027E-07
807 0.8075 0.9102 2.2991 1.66127E-07
808 0.804 0.9164 2.3055 1.67207E-07
809 0.8014 0.9227 2.3114 1.68826E-07
810 0.7987 0.9291 2.3172 1.69546E-07
811 0.7961 0.9354 2.3212 1.71346E-07
812 0.7941 0.9416 2.3253 1.72426E-07
813 0.7922 0.9478 2.3281 1.74406E-07
814 0.7904 0.9539 2.3309 1.73506E-07
815 0.7888 0.9603 2.3335 1.77106E-07
816 0.7874 0.9666 2.3361 1.79086E-07
817 0.7861 0.9728 2.3388 1.81965E-07
818 0.7849 0.9789 2.3415 1.83765E-07
819 0.7842 0.9848 2.3442 1.83405E-07
820 0.7834 0.9911 2.3469 1.88445E-07
821 0.7827 0.9973 2.3478 1.90065E-07
822 0.7822 1.0032 2.3486 1.90785E-07
823 0.7817 1.0091 2.3471 1.96724E-07
824 0.7812 1.0153 2.3455 2.02124E-07
825 0.7809 1.0211 2.3429 2.05904E-07
826 0.7808 1.0273 2.3403 2.19222E-07
827 0.7806 1.0333 2.3369 2.26782E-07
828 0.7805 1.0393 2.3335 2.39921E-07
829 0.7804 1.0449 2.33 2.491E-07
830 0.7804 1.0507 2.3265 2.62599E-07
831 0.7804 1.0564 2.3233 2.71778E-07
832 0.7804 1.0621 2.32 2.85457E-07
833 0.7804 1.068 2.3174 2.94816E-07
834 0.7805 1.0739 2.3148 2.98056E-07
835 0.7805 1.0797 2.3131 3.05796E-07
836 0.7806 1.0851 2.3113 3.13175E-07
837 0.7807 1.0907 2.3106 3.13175E-07
838 0.7809 1.0962 2.3098 3.16415E-07
839 0.7812 1.1018 2.309 3.19114E-07
840 0.7815 1.1072 2.3081 3.23074E-07
841 0.7817 1.1128 2.3062 3.26314E-07
842 0.782 1.1182 2.3043 3.24874E-07
843 0.7823 1.1233 2.3019 3.26494E-07
844 0.7827 1.1286 2.2995 3.27934E-07
845 0.7833 1.1339 2.2972 3.30274E-07
846 0.7839 1.1391 2.2948 3.32613E-07
847 0.7845 1.1442 2.2934 3.34053E-07
848 0.785 1.1494 2.2919 3.38913E-07
849 0.7856 1.1547 2.2912 3.41613E-07
850 0.7861 1.1596 2.2905 3.44312E-07
851 0.7871 1.1645 2.2879 3.43413E-07
852 0.788 1.1694 2.2853 3.48452E-07
853 0.789 1.1742 2.2805 3.47552E-07
854 0.7901 1.179 2.2757 3.47372E-07
855 0.7912 1.1842 2.2685 3.48092E-07
856 0.7923 1.1885 2.2613 3.52592E-07
857 0.7935 1.1934 2.2527 3.52772E-07
858 0.7949 1.198 2.2442 3.54392E-07
859 0.7963 1.2026 2.2373 3.54932E-07
860 0.7977 1.2071 2.2303 3.56551E-07
861 0.7993 1.2114 2.2259 3.60151E-07
862 0.8009 1.2156 2.2214 3.60331E-07
863 0.8025 1.22 2.217 3.61411E-07
864 0.8044 1.2245 2.2127 3.59251E-07
865 0.8063 1.2286 2.2069 3.66091E-07
866 0.8082 1.2325 2.201 3.63751E-07
867 0.8102 1.2367 2.1941 3.68071E-07
868 0.8122 1.2407 2.1872 3.67891E-07
869 0.8143 1.2449 2.1773 3.7527E-07
870 0.8166 1.249 2.1674 3.7941E-07
871 0.8189 1.2529 2.1529 3.8085E-07
872 0.8213 1.2565 2.1384 3.7995E-07
873 0.8237 1.2601 2.1256 3.84809E-07
874 0.8261 1.2641 2.1128 3.88769E-07
875 0.8285 1.2678 2.1029 3.90929E-07
876 0.831 1.271 2.093 3.91289E-07
877 0.8336 1.2746 2.0846 3.99028E-07
878 0.8361 1.2781 2.0763 4.02448E-07
879 0.8387 1.2814 2.0684 4.10007E-07
880 0.8412 1.2846 2.0606 4.10727E-07
881 0.8438 1.2878 2.053 4.12167E-07
882 0.8463 1.2907 2.0454 4.23866E-07
883 0.8489 1.2938 2.0359 4.25846E-07
884 0.8516 1.2971 2.0265 4.34305E-07
885 0.8542 1.3 2.0164 4.35745E-07
886 0.8568 1.3027 2.0063 4.38625E-07
887 0.8594 1.3058 1.9959 4.39165E-07
888 0.862 1.3084 1.9855 4.40425E-07
889 0.8645 1.3108 1.9725 4.50684E-07
890 0.867 1.3137 1.9594 4.66523E-07
891 0.8694 1.3165 1.9467 4.64183E-07
892 0.8718 1.3189 1.934 4.63103E-07
893 0.8742 1.321 1.9203 4.70122E-07
894 0.8765 1.3235 1.9066 4.68323E-07
895 0.8787 1.3262 1.8916 4.75702E-07
896 0.8807 1.3283 1.8766 4.73362E-07
897 0.8827 1.3304 1.8619 4.80022E-07
898 0.8846 1.3323 1.8472 4.93161E-07
899 0.8863 1.3341 1.8343 5.0054E-07
900 0.888 1.3365 1.8213 5.14399E-07
901 0.8897 1.3385 1.8113 5.16379E-07
902 0.891 1.3403 1.8012 5.23578E-07
903 0.8923 1.342 1.7933 5.28798E-07
904 0.8936 1.3435 1.7854 5.33117E-07
905 0.8944 1.3452 1.7784 5.40497E-07
906 0.8952 1.3467 1.7713 5.47516E-07
907 0.8959 1.3478 1.7649 5.53096E-07
908 0.8962 1.3496 1.7585 5.59035E-07
909 0.8965 1.3507 1.7523 5.67855E-07
910 0.8968 1.3514 1.746 5.75954E-07
911 0.8964 1.3528 1.7362 5.82433E-07
912 0.8957 1.3542 1.7265 5.92873E-07
913 0.8951 1.3553 1.7167 6.03312E-07
914 0.8942 1.3562 1.7068 6.15551E-07
915 0.8931 1.357 1.697 6.2563E-07
916 0.892 1.3578 1.6873 6.40389E-07
917 0.8904 1.3582 1.6735 6.55508E-07
918 0.8885 1.3587 1.6597 6.71526E-07
919 0.8866 1.3585 1.6456 6.87905E-07
920 0.8844 1.359 1.6315 7.09323E-07
921 0.8817 1.3598 1.6172 7.32001E-07
922 0.879 1.3602 1.6029 7.5432E-07
923 0.876 1.3602 1.5863 7.80778E-07
924 0.8726 1.3602 1.5697 8.09755E-07
925 0.8691 1.3602 1.5495 8.41253E-07
926 0.8655 1.3604 1.5292 8.7365E-07
927 0.8613 1.3603 1.5106 9.09287E-07
928 0.8571 1.3599 1.4919 9.47804E-07
929 0.8528 1.36 1.4772 9.88121E-07
930 0.848 1.3595 1.4625 1.03312E-06
931 0.8432 1.3593 1.448 1.07631E-06
932 0.8382 1.359 1.4335 1.12455E-06
933 0.8324 1.3584 1.4161 1.17531E-06
934 0.8265 1.3577 1.3988 1.2275E-06
935 0.8207 1.3569 1.38 1.28114E-06
936 0.8143 1.3557 1.3613 1.33657E-06
937 0.808 1.3549 1.3427 1.39471E-06
938 0.8016 1.3545 1.3241 1.45554E-06
939 0.7945 1.3533 1.3053 0.000001518
940 0.7874 1.352 1.2865 1.58459E-06
941 0.7802 1.3511 1.2724 1.65191E-06
942 0.7727 1.3502 1.2583 1.72912E-06
943 0.7651 1.3487 1.2471 1.80742E-06
944 0.7575 1.3468 1.236 1.89039E-06
945 0.7493 1.3453 1.2258 1.98002E-06
946 0.741 1.3445 1.2156 2.07199E-06
947 0.7327 1.3428 1.2014 2.17171E-06
948 0.7241 1.341 1.1871 2.28168E-06
949 0.7154 1.3394 1.1698 2.40011E-06
950 0.7068 1.3374 1.1525 2.5225E-06
951 0.6982 1.3354 1.135 2.65281E-06
952 0.6896 1.3332 1.1175 2.78834E-06
953 0.681 1.3313 1.1009 2.92495E-06
954 0.6715 1.3293 1.0843 3.06246E-06
955 0.6616 1.3263 1.0745 3.19474E-06
956 0.6517 1.324 1.0648 3.31857E-06
957 0.642 1.3217 1.0539 3.43161E-06
958 0.6324 1.3199 1.0429 3.5351E-06
959 0.6229 1.3172 1.0356 3.62563E-06
960 0.6133 1.3144 1.0282 3.70086E-06
961 0.6037 1.3123 1.0256 3.76494E-06
962 0.5941 1.3099 1.0229 3.81461E-06
963 0.5843 1.307 1.0222 3.85115E-06
964 0.5745 1.3042 1.0215 3.88067E-06
965 0.5647 1.3018 1.0087 3.90335E-06
966 0.555 1.2995 0.9959 3.92189E-06
967 0.5453 1.2966 0.9804 3.93395E-06
968 0.5357 1.2928 0.9649 3.94402E-06
969 0.5261 1.29 0.9484 3.95032E-06
970 0.5166 1.2868 0.9319 3.9541E-06
971 0.5071 1.2838 0.9198 3.95608E-06
972 0.4976 1.2807 0.9078 3.95824E-06
973 0.488 1.2773 0.8995 3.95536E-06
974 0.4785 1.2735 0.8913 3.9523E-06
975 0.4691 1.2692 0.8863 3.94636E-06
976 0.4597 1.2656 0.8813 3.93503E-06
977 0.4504 1.2624 0.8773 3.92297E-06
978 0.4413 1.259 0.8733 3.90821E-06
979 0.4323 1.2549 0.867 3.88931E-06
980 0.4233 1.2513 0.8606 3.86807E-06
981 0.4146 1.247 0.8505 3.84467E-06
982 0.4061 1.243 0.8403 3.81767E-06
983 0.3975 1.2393 0.8292 3.79032E-06
984 0.3892 1.2351 0.818 3.76026E-06
985 0.381 1.2305 0.8093 3.7275E-06
986 0.3729 1.226 0.8005 3.69402E-06
987 0.3648 1.2219 0 3.65767E-06
988 0.3567 1.2173 0 3.61969E-06
989 0.3487 1.2133 0 3.58081E-06
990 0.3409 1.2087 0 3.54122E-06
991 0.3334 1.2043 0 3.5009E-06
992 0.3259 1.1992 0 3.45878E-06
993 0.3187 1.1939 0 3.41703E-06
994 0.3117 1.1893 0 3.37149E-06
995 0.3047 1.1848 0 3.32757E-06
996 0.2978 1.1789 0 3.2833E-06
997 0.2909 1.1733 0 3.23704E-06
998 0.2841 1.1694 0 3.19204E-06
999 0.2776 1.1637 0 3.14687E-06
private directories in matlab are not visible to the enduser, and can only be executed by functions that are located in the immediate parent directory.
\ No newline at end of file
function [A,E,R] = cart2dpol(X,Y,Z)
% [A,E,R] = CART2DPOL(X,Y,Z)
%
% transforms corresponding elements of data stored in Cartesian [X,Y,Z] to
% double-polar coordinates (azimuth angle A, elevation angle E, and radius
% R). The arrays X, Y and Z must be the same size. Angles A and E are
% returned in degrees.
%
% If X is a matrix with three columns (and Y and Z are not given), they are
% taken to be [X Y Z].
%
% See also DPOL2CART, DPOL2SPH, SPH2DPOL, DPOL2IPOL, IPOL2DPOL
% AUTHOR: Marc M. van Wanrooij
%% Initialization
if nargin==1
Y = X(:,2);
Z = X(:,3);
X = X(:,1);
end
R2D = 180/pi; % radians to degrees
%% Coordinate transformation
A = R2D * atan2(Y, sqrt (X.^2 + Z.^2));
E = R2D * atan2(X, sqrt (Y.^2 + Z.^2));
sel = z<0 & y>=0;
E(sel) = -180-E(sel);
sel = z<0 & y<0;
E(sel) = 180-E(sel);
R = sqrt(sum([X Y Z].^2,2));
%% Output
if nargout==1
A = [A E R];
end
\ No newline at end of file
function varargout = dpol2cart(A,E,R)
% [X,Y,Z] = DPOL2CART(A,E,R)
%
% transforms corresponding elements of data stored in double-polar (azimuth
% angle A, elevation angle E, and radius R) to Cartesian [X,Y,Z]
% coordinates. The arrays A, E and R must be the same size. Angles A and
% E are in degrees.
%
% If A is a matrix with three columns (and E and R are not given), they are
% taken to be [A E R]. If A is a matrix with two columns (and E and R are not given), they are
% taken to be [A E] and R is set to unity.
%
% See also DPOL2CART, DPOL2SPH, SPH2DPOL, DPOL2IPOL, IPOL2DPOL
% AUTHOR: Marc M. van Wanrooij
%% Initialization
if nargin==1 && size(A,2)==2
E = A(:,2);
A = A(:,1);
end
if nargin<3
R = ones(size(A));
end
%% Express angles in radians
D2R = pi/180; % radians to degrees
A = A*D2R;
E = E*D2R;
%% Convert to Cartesian Coordinates
X = R*sin(A); % Left-right
Y = R*sin(E); % Up-Down
signZ = sign(cos(A).*cos(E)); % front-back
absZ = abs(sqrt(R.^2-X.^2-Y.^2));
Z = signZ .* absZ;
%% Output
if nargout == 1 || nargout == 0
varargout(1) = {[X Y Z]};
elseif nargout == 3
varargout(1) = {X};
varargout(2) = {Y};
varargout(3) = {Z};
else
disp('Wrong number of output arguments');
end
\ No newline at end of file
......@@ -4,12 +4,12 @@ function [MU,SD,A,x,y] = ellipse(x,y,varargin)
% Determine main axes (direction and std) of 2-dimensional matrix [X,Y].
%
%
% PA_ELLIPSE(...,'PARAM1',val1,'PARAM2',val2) specifies optional
% ELLIPSE(...,'PARAM1',val1,'PARAM2',val2) specifies optional
% name/value pairs. Parameters are:
% 'outlier' - removes outliers, that are 'outlier'*standard deviation
% away from the cardinal axis means.
%
% See also PA_ELLIPSEPLOT, EIG, COV
% See also ELLIPSEPLOT, EIG, COV
% 2011 Marc van Wanrooij
% e-mail: marcvanwanrooij@neural-code.com
......@@ -24,12 +24,11 @@ end
[Veig,Deig] = eig(cov(x,y)); % Veig gives main axes
A = bf_rad2deg(atan2(Veig(2),Veig(1))); % angle
%% Delete response >3SD
if ~isempty(out)
SD = sqrt(diag(Deig)); % diagonal Deig = variance in the 2 main axes
xmu = mean(x);
ymu = mean(y);
SD = sqrt(diag(Deig)); % diagonal Deig = variance in the 2 main axes
xmu = mean(x);
ymu = mean(y);
[Xr,Yr] = rotate2d(x,y,-A);
seld = abs(Xr-mean(Xr))<out*SD(2) & abs(Yr-mean(Yr))<out*SD(1);
......@@ -37,8 +36,8 @@ if ~isempty(out)
y = y(seld);
%% Eigen-values for covariance-matrix
[Veig,Deig] = eig(cov(x,y)); % Veig gives main axes
A = rad2deg(atan2(Veig(2),Veig(1))); % angle
[Veig,Deig] = eig(cov(x,y)); % Veig gives main axes
A = rad2deg(atan2(Veig(2),Veig(1))); % angle
end
%% diagonal Deig = variance in the 2 main axes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment