forked from udacity/CarND-Unscented-Kalman-Filter-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMatlabCodeForPlottingNIS.m
22 lines (20 loc) · 8.32 KB
/
MatlabCodeForPlottingNIS.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
A=[0 0 0 0.787014 1.52451 0.787014 1.52451 3.20613 0.573496 3.20613 0.573496 2.98295 0.30151 2.98295 0.30151 1.86965 0.198466 1.86965 0.198466 0.720919 0.686038 0.720919 0.686038 2.78215 3.56158 2.78215 3.56158 3.6722 0.220229 3.6722 0.220229 1.12176 10.2667 1.12176 10.2667 1.41227 3.43591 1.41227 3.43591 1.76203 2.08201 1.76203 2.08201 3.58601 3.46885 3.58601 3.46885 0.343472 0.19051 0.343472 0.19051 2.46071 2.37063 2.46071 2.37063 5.17723 0.573837 5.17723 0.573837 2.27576 0.254822 2.27576 0.254822 6.66623 0.507195 6.66623 0.507195 6.86662 0.603404 6.86662 0.603404 4.23584 2.45365 4.23584 2.45365 4.39383 0.934851 4.39383 0.934851 3.11927 1.86774 3.11927 1.86774 2.54445 2.46872 2.54445 2.46872 0.769282 0.315372 0.769282 0.315372 1.44796 0.838071 1.44796 0.838071 0.845891 3.10372 0.845891 3.10372 2.95918 2.24891 2.95918 2.24891 10.3931 0.983446 10.3931 0.983446 0.116262 0.358242 0.116262 0.358242 1.61806 2.55702 1.61806 2.55702 3.43899 0.699851 3.43899 0.699851 2.37883 0.310352 2.37883 0.310352 1.18491 0.397329 1.18491 0.397329 1.59371 0.196532 1.59371 0.196532 0.738521 0.509136 0.738521 0.509136 3.52848 0.308187 3.52848 0.308187 1.70432 0.21506 1.70432 0.21506 3.01523 1.91084 3.01523 1.91084 0.619217 0.930936 0.619217 0.930936 0.826562 0.573685 0.826562 0.573685 0.202564 1.84097 0.202564 1.84097 0.794673 3.62639 0.794673 3.62639 3.88166 1.66611 3.88166 1.66611 0.304087 1.2548 0.304087 1.2548 2.19586 3.21796 2.19586 3.21796 0.47675 3.87753 0.47675 3.87753 1.0623 3.29282 1.0623 3.29282 2.33937 1.04436 2.33937 1.04436 7.45216 1.03325 7.45216 1.03325 2.39309 2.13073 2.39309 2.13073 4.93159 0.038465 4.93159 0.038465 8.96991 5.47466 8.96991 5.47466 4.47357 0.875158 4.47357 0.875158 2.56508 2.24475 2.56508 2.24475 2.16574 0.973851 2.16574 0.973851 1.35925 1.42684 1.35925 1.42684 0.764108 0.3579 0.764108 0.3579 1.33752 0.982045 1.33752 0.982045 3.4016 2.3175 3.4016 2.3175 7.34791 3.63351 7.34791 3.63351 1.42183 0.0689096 1.42183 0.0689096 1.9492 0.46842 1.9492 0.46842 0.23961 0.305229 0.23961 0.305229 6.19701 2.08132 6.19701 2.08132 6.22326 3.81075 6.22326 3.81075 1.64359 0.88729 1.64359 0.88729 2.63512 1.01259 2.63512 1.01259 6.38117 0.597985 6.38117 0.597985 1.9383 0.241415 1.9383 0.241415 2.94041 2.82423 2.94041 2.82423 3.26647 0.851986 3.26647 0.851986 10.067 0.748452 10.067 0.748452 3.24711 1.18261 3.24711 1.18261 5.45532 1.82968 5.45532 1.82968 2.32892 0.564134 2.32892 0.564134 1.25075 0.704405 1.25075 0.704405 0.227387 1.52304 0.227387 1.52304 1.7463 0.152778 1.7463 0.152778 2.04815 2.10482 2.04815 2.10482 2.56928 0.171544 2.56928 0.171544 0.906238 1.75164 0.906238 1.75164 1.0464 0.65166 1.0464 0.65166 4.06715 0.386139 4.06715 0.386139 5.72327 3.6033 5.72327 3.6033 0.994898 1.58584 0.994898 1.58584 1.488 0.819875 1.488 0.819875 1.57681 2.47745 1.57681 2.47745 4.64153 2.88281 4.64153 2.88281 0.186948 0.0983095 0.186948 0.0983095 3.49335 2.8526 3.49335 2.8526 0.222552 0.269378 0.222552 0.269378 0.509624 0.104885 0.509624 0.104885 2.94856 0.326139 2.94856 0.326139 1.78027 1.99017 1.78027 1.99017 1.80165 1.98485 1.80165 1.98485 4.79053 0.716735 4.79053 0.716735 1.49403 1.08371 1.49403 1.08371 1.2706 1.53351 1.2706 1.53351 7.01091 3.13286 7.01091 3.13286 3.47772 1.16593 3.47772 1.16593 2.29792 6.17877 2.29792 6.17877 2.72038 0.066291 2.72038 0.066291 2.37013 0.51038 2.37013 0.51038 4.74104 2.26392 4.74104 2.26392 0.696754 1.39086 0.696754 1.39086 2.48663 0.633318 2.48663 0.633318 0.872163 1.72834 0.872163 1.72834 2.26665 0.949026 2.26665 0.949026 2.05719 0.547465 2.05719 0.547465 2.50583 4.07427 2.50583 4.07427 0.588072 1.35054 0.588072 1.35054 1.49782 3.41827 1.49782 3.41827 3.47832 0.45545 3.47832 0.45545 3.54587 0.487579 3.54587 0.487579 2.60365 3.64522 2.60365 3.64522 1.96847 1.38509 1.96847 1.38509 2.31027 0.621094 2.31027 0.621094 1.53162 2.07309 1.53162 2.07309 0.568487 0.933103 0.568487 0.933103 2.34594 3.96326 2.34594 3.96326 1.97967 0.0656837 1.97967 0.0656837 2.46275 1.11961 2.46275 1.11961 5.54618 0.612889 5.54618 0.612889 4.7616 0.231018 4.7616 0.231018 2.1007 2.55987 2.1007 2.55987 3.49422 0.273004 3.49422 0.273004 3.70665 1.87103 3.70665 1.87103 1.88049 0.598186 1.88049 0.598186 0.4864 1.99762 0.4864 1.99762 1.77044 2.01262 1.77044 2.01262 1.63073 0.913865 1.63073 0.913865 4.00405 0.0188134 4.00405 0.0188134 0.524779 1.31739 0.524779 1.31739 0.326538 0.533659 0.326538 0.533659 3.70098 1.36309 3.70098 1.36309 0.173814 5.34221 0.173814 5.34221 1.26957 3.96876 1.26957 3.96876 5.48091 1.60359 5.48091 1.60359 5.82815 1.60487 5.82815 1.60487 3.423 2.07742 3.423 2.07742 5.17322 2.03061 5.17322 2.03061 3.10242 0.906932 3.10242 0.906932 3.12192 0.668349 3.12192 0.668349 3.07118 0.290974 3.07118 0.290974 0.878276 2.96125 0.878276 2.96125 0.38691 1.37165 0.38691 1.37165 4.48096 4.4265 4.48096 4.4265 0.452786 0.649766 0.452786 0.649766 0.436644 1.28557 0.436644 1.28557 2.20079 0.261801 2.20079 0.261801 3.33383 1.88054 3.33383 1.88054 0.25416 0.0818833 0.25416 0.0818833 5.39474 3.91316 5.39474 3.91316 1.12523 0.786106 1.12523 0.786106 7.1826 0.650227 7.1826 0.650227 0.847745 3.76651 0.847745 3.76651 1.59799 3.46104 1.59799 3.46104 1.3034 3.34566 1.3034 3.34566 1.63502 2.75788 1.63502 2.75788 1.25401 0.32975 1.25401 0.32975 2.8958 1.45783 2.8958 1.45783 1.33903 4.11782 1.33903 4.11782 2.72048 1.46721 2.72048 1.46721 3.08033 1.56897 3.08033 1.56897 2.95907 0.984795 2.95907 0.984795 0.371873 1.62911 0.371873 1.62911 4.56354 5.44869 4.56354 5.44869 2.14109 2.12664 2.14109 2.12664 2.2006 0.465846 2.2006 0.465846 4.92518 1.44964 4.92518 1.44964 8.11903 0.5074 8.11903 0.5074 1.66328 0.165346 1.66328 0.165346 0.512015 2.21781 0.512015 2.21781 1.74636 0.264829 1.74636 0.264829 3.89085 3.10987 3.89085 3.10987 0.990354 1.06078 0.990354 1.06078 4.81778 14.7848 4.81778 14.7848 1.53672 0.829522 1.53672 0.829522 2.55737 1.09659 2.55737 1.09659 1.97733 1.24722 1.97733 1.24722 6.1232 0.0673014 6.1232 0.0673014 2.2733 1.46811 2.2733 1.46811 0.74438 6.155 0.74438 6.155 2.90214 2.15285 2.90214 2.15285 2.2922 0.739634 2.2922 0.739634 0.925304 2.29684 0.925304 2.29684 1.93327 2.90547 1.93327 2.90547 3.45665 5.32195 3.45665 5.32195 0.301617 2.83734 0.301617 2.83734 1.82325 0.40065 1.82325 0.40065 1.21237 0.593536 1.21237 0.593536 5.92711 0.527923 5.92711 0.527923 0.114416 0.587554 0.114416 0.587554 11.5651 1.80495 11.5651 1.80495 3.00971 4.11 3.00971 4.11 0.084531 1.37754 0.084531 1.37754 1.89789 5.98332 1.89789 5.98332 1.34309 1.09814 1.34309 1.09814 2.02952 1.16613 2.02952 1.16613 1.63339 0.00353419 1.63339 0.00353419 5.15851 0.676591 5.15851 0.676591 2.29616 2.6263 2.29616 2.6263 2.74831 1.46484 2.74831 1.46484 1.80928 2.68506 1.80928 2.68506 6.39407 0.223466 6.39407 0.223466 8.28278 0.567911 8.28278 0.567911 0.492945 0.880187 0.492945 0.880187 0.467445 0.115724 0.467445 0.115724 3.21387 1.40577 3.21387 1.40577 2.09243 0.316827 2.09243 0.316827 1.12931 3.71014 1.12931 3.71014 0.577253 2.1019 0.577253 2.1019 9.06103 0.400546 9.06103 0.400546 2.3217 0.981814 2.3217 0.981814 0.804325 1.18655 0.804325 1.18655 3.02371 0.0237582 3.02371 0.0237582 4.79868 0.0632812 4.79868 0.0632812 1.44002 4.30701 1.44002 4.30701 5.49855 0.966405 5.49855 0.966405 1.81089 0.305368 1.81089 0.305368 2.54318 2.09122 2.54318 2.09122 5.6141 0.0326648 5.6141 0.0326648 1.53773 4.74652 1.53773 4.74652 5.47117 2.86177 5.47117 2.86177 5.018 1.28744 5.018 1.28744 1.2517 0.593078 1.2517 0.593078 0.734321 0.794289 0.734321 0.794289 4.77893 6.16712 4.77893 6.16712 1.72723 0.68079 1.72723 0.68079 5.60315 2.83496 5.60315 2.83496 3.01166 0.634956 3.01166 0.634956 0.374568 0.668086 0.374568 0.668086 0.0387902 1.04473 0.0387902 1.04473 0.443428 1.33527 0.443428 1.33527 0.265095 2.15462 0.265095 2.15462 7.4198 0.234516 7.4198 0.234516 6.71425 2.07477 6.71425 2.07477 0.570201 7.7215 0.570201 7.7215 1.36682 0.802841 1.36682 0.802841 0.348784 3.6497 0.348784 3.6497 1.12368 2.31534 1.12368 2.31534 0.312356 1.85352 0.312356 1.85352 2.75741 0.834542 2.75741 0.834542 9.16946 2.69627 9.16946 2.69627 0.376916 1.00548 0.376916 1.00548 6.9357 2.00937 6.9357 2.00937 3.89513 0.689045 3.89513 0.689045 2.52668 0.995954 2.52668 0.995954 6.42804 4.50554 6.42804 4.50554 1.40219 5.93255 1.40219 5.93255 1.71828 0.649383 1.71828]
for i = 1:499
NIS_L(i) = A(2*i-1);
NIS_R(i) = A(2*i);
Time(i) = i;
LineL(i) = 5.99;
LineR(i) = 7.81;
end
figure(1)
plot(Time, NIS_L)
yyaxis right;
plot(Time, LineL)
grid minor;
ylim([0 15]);
figure(2)
plot(Time, NIS_R)
yyaxis right;
plot(Time, LineR)
grid minor;
ylim([0 12]);