07-Jan-2022 22:45:15 llsq_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test llsq(). llsq_test01() LLSQ can compute the formula for a line of the form y = A * x + B which minimizes the RMS error to a set of N data values. Estimated relationship is y = 61.2722 * x + -39.062 Expected value is y = 61.272 * x - 39.062 I X Y B+A*X |error| 1 1.470000 52.210000 51.008158 -1.201842 2 1.500000 53.120000 52.846324 -0.273676 3 1.520000 54.480000 54.071768 -0.408232 4 1.550000 55.840000 55.909933 0.069933 5 1.570000 57.200000 57.135377 -0.064623 6 1.600000 58.570000 58.973543 0.403543 7 1.630000 59.930000 60.811708 0.881708 8 1.650000 61.290000 62.037152 0.747152 9 1.680000 63.110000 63.875317 0.765317 10 1.700000 64.470000 65.100761 0.630761 11 1.730000 66.280000 66.938927 0.658927 12 1.750000 68.100000 68.164371 0.064371 13 1.780000 69.920000 70.002536 0.082536 14 1.800000 72.190000 71.227980 -0.962020 15 1.830000 74.460000 73.066145 -1.393855 RMS error = 0.706662 llsq_test02() LLSQ can compute the formula for a line of the form y = A * x + B which minimizes the RMS error to a set of N data values. Estimated relationship is y = 1.14492 * x + 0.897108 I X Y B+A*X |error| 1 1.944171 2.746655 3.123033 0.376378 2 2.217376 3.427082 3.435832 0.008749 3 -0.119040 1.173379 0.760817 -0.412562 4 2.240128 3.625969 3.461881 -0.164088 5 1.397078 2.159710 2.496654 0.336944 6 -0.207379 1.083799 0.659676 -0.424124 7 0.335495 0.870563 1.281224 0.410661 8 1.140645 1.790187 2.203058 0.412871 9 2.372521 3.988024 3.613460 -0.374564 10 2.394666 3.938706 3.638815 -0.299891 11 -0.027161 1.103465 0.866011 -0.237454 12 2.411778 4.005590 3.658407 -0.347183 13 2.371501 3.768899 3.612293 -0.156606 14 0.956127 1.519281 1.991799 0.472519 15 1.900841 2.675074 3.073424 0.398350 RMS error = 0.344966 llsq_test03() LLSQ0 can compute the formula for a line of the form y = A * x which minimizes the RMS error to a set of N data values. Estimated relationship is y = 0.641657 * x I X Y A*X |error| 1 0.000000 0.000000 0.000000 0.000000 2 0.100000 0.086500 0.064166 -0.022334 3 0.150000 0.101500 0.096249 -0.005251 4 0.200000 0.110600 0.128331 0.017731 5 0.250000 0.127900 0.160414 0.032514 6 0.300000 0.189200 0.192497 0.003297 7 0.350000 0.269500 0.224580 -0.044920 8 0.400000 0.288800 0.256663 -0.032137 9 0.450000 0.242500 0.288746 0.046246 10 0.500000 0.346500 0.320828 -0.025672 11 0.550000 0.322500 0.352911 0.030411 12 0.600000 0.376400 0.384994 0.008594 13 0.650000 0.426300 0.417077 -0.009223 14 0.700000 0.456200 0.449160 -0.007040 RMS error = 0.0251999 llsq_test04() LLSQ0 can compute the formula for a line of the form y = A * x + B which minimizes the RMS error to a set of N data values. Estimated relationship is y = -0.0295285 * x + 54.5468 Expected value is y = 61.272 * x - 39.062 I X Y B+A*X |error| 1 1565.000000 8.200000 8.334718 0.134718 2 1570.000000 8.910891 8.187076 -0.723816 3 1575.000000 8.267717 8.039433 -0.228283 4 1580.000000 9.570312 7.891791 -1.678522 5 1585.000000 8.058252 7.744148 -0.314104 6 1590.000000 8.952381 7.596506 -1.355875 7 1595.000000 11.552347 7.448863 -4.103483 8 1600.000000 4.812834 7.301221 2.488387 9 1605.000000 5.799649 7.153578 1.353930 10 1610.000000 5.536332 7.005936 1.469604 11 1615.000000 5.555556 6.858293 1.302738 12 1620.000000 5.823627 6.710651 0.887024 13 1625.000000 5.392157 6.563009 1.170852 14 1630.000000 7.234727 6.415366 -0.819361 15 1635.000000 5.238095 6.267724 1.029628 16 1640.000000 6.122449 6.120081 -0.002368 17 1645.000000 8.217054 5.972439 -2.244615 18 1650.000000 6.461538 5.824796 -0.636742 19 1655.000000 6.136364 5.677154 -0.459210 20 1660.000000 6.888889 5.529511 -1.359377 21 1665.000000 4.705882 5.381869 0.675987 22 1670.000000 5.362319 5.234227 -0.128092 23 1675.000000 6.142857 5.086584 -1.056273 24 1680.000000 4.794521 4.938942 0.144421 25 1685.000000 3.552632 4.791299 1.238668 26 1690.000000 5.000000 4.643657 -0.356343 27 1695.000000 5.882353 4.496014 -1.386339 28 1700.000000 3.333333 4.348372 1.015039 29 1705.000000 3.200000 4.200729 1.000729 30 1710.000000 4.000000 4.053087 0.053087 31 1715.000000 2.808511 3.905445 1.096934 32 1720.000000 2.320000 3.757802 1.437802 33 1725.000000 3.000000 3.610160 0.610160 34 1730.000000 1.954887 3.462517 1.507630 35 1735.000000 2.352941 3.314875 0.961934 36 1740.000000 1.928571 3.167232 1.238661 37 1745.000000 1.896552 3.019590 1.123038 38 1750.000000 2.066667 2.871947 0.805281 39 1755.000000 2.261146 2.724305 0.463158 40 1760.000000 1.878788 2.576663 0.697875 41 1765.000000 2.443182 2.429020 -0.014162 42 1770.000000 2.540541 2.281378 -0.259163 43 1775.000000 2.256410 2.133735 -0.122675 44 1780.000000 2.190476 1.986093 -0.204383 45 1785.000000 1.826087 1.838450 0.012363 46 1790.000000 1.862745 1.690808 -0.171937 47 1795.000000 2.763636 1.543165 -1.220471 48 1800.000000 2.771930 1.395523 -1.376407 49 1805.000000 2.745763 1.247881 -1.497882 50 1810.000000 3.300000 1.100238 -2.199762 RMS error = 1.21898 llsq_test() Normal end of execution. 07-Jan-2022 22:45:21