Cody

# Problem 45392. Convert a temperature reading from Celsius to an unknown scale

Solution 2331778

Submitted on 22 May 2020 by Hajo Frerichs
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(celsius_to_franklin(605.86,942.86,701.08,873.83,981.92),670.23))

linfit = 1.0e+03 * -0.0007 1.3821 y = 670.2343 y = 670.2300

2   Pass
assert(isequal(celsius_to_franklin(-283.48,-820.99,34.93,-540.53,578.22),-61.99))

linfit = 0.8808 -571.2968 y = -61.9925 y = -61.9900

3   Pass
assert(isequal(celsius_to_franklin(-642.38,-545.91,-236.27,259.69,641.57),2001.06))

linfit = 1.9837 728.3786 y = 2.0011e+03 y = 2.0011e+03

4   Pass
assert(isequal(celsius_to_franklin(-388.76,740.12,-355.52,996.42,156.00),4940.54))

linfit = 1.0e+03 * 0.0077 3.7377 y = 4.9405e+03 y = 4.9405e+03

5   Pass
assert(isequal(celsius_to_franklin(-424.57,-136.40,-544.47,-598.13,-454.91),-253.24))

linfit = 1.0e+03 * 0.0039 1.4986 y = -253.2381 y = -253.2400

6   Pass
assert(isequal(celsius_to_franklin(-943.67,428.22,-381.09,-96.63,823.88),-1220.79))

linfit = -0.9329 -452.1618 y = -1.2208e+03 y = -1.2208e+03

7   Pass
assert(isequal(celsius_to_franklin(205.93,437.77,-539.18,6.82,-447.39),59.91))

linfit = 0.5784 318.6661 y = 59.9087 y = 59.9100

8   Pass
assert(isequal(celsius_to_franklin(863.18,284.69,-263.58,368.62,926.41),279.98))

linfit = -0.0745 348.9865 y = 279.9801 y = 279.9800

9   Pass
assert(isequal(celsius_to_franklin(-147.74,127.01,-672.12,-960.23,-492.42),-587.64))

linfit = 2.0734 433.3314 y = -587.6433 y = -587.6400

10   Pass
assert(isequal(celsius_to_franklin(-470.00,-330.01,245.92,32.44,368.50),94.50))

linfit = 0.5063 -92.0623 y = 94.4988 y = 94.5000

11   Pass
assert(isequal(celsius_to_franklin(-953.62,-685.32,-111.79,461.55,-660.24),-285.63))

linfit = 1.3624 613.8475 y = -285.6327 y = -285.6300

12   Pass
assert(isequal(celsius_to_franklin(657.17,897.22,-335.17,803.76,-866.72),753.70))

linfit = 0.0942 835.3268 y = 753.6979 y = 753.7000

13   Pass
assert(isequal(celsius_to_franklin(584.48,-166.12,259.41,-70.18,555.04),-157.43))

linfit = -0.2951 6.3813 y = -157.4312 y = -157.4300

14   Pass
assert(isequal(celsius_to_franklin(-409.79,-416.75,-96.33,609.90,-841.00),-1829.06))

linfit = 3.2752 925.4018 y = -1.8291e+03 y = -1.8291e+03

15   Pass
assert(isequal(celsius_to_franklin(-307.20,-48.77,366.97,569.72,-590.24),-308.43))

linfit = 0.9174 233.0582 y = -308.4336 y = -308.4300

16   Pass
assert(isequal(celsius_to_franklin(-640.68,-365.85,-741.44,-757.17,-230.91),1225.57))

linfit = 1.0e+03 * 0.0039 2.1223 y = 1.2256e+03 y = 1.2256e+03

17   Pass
assert(isequal(celsius_to_franklin(-132.47,214.18,-277.77,782.82,-612.67),2093.47))

linfit = -3.9136 -304.2490 y = 2.0935e+03 y = 2.0935e+03

18   Pass
assert(isequal(celsius_to_franklin(-690.34,-308.03,216.70,-736.01,-355.91),-465.83))

linfit = -0.4718 -633.7617 y = -465.8283 y = -465.8300

19   Pass
assert(isequal(celsius_to_franklin(927.61,379.39,698.87,962.06,-538.43),4113.84))

linfit = 1.0e+03 * -0.0025 2.7423 y = 4.1138e+03 y = 4.1138e+03

20   Pass
assert(isequal(celsius_to_franklin(-886.01,-463.51,756.77,803.12,87.47),287.07))

linfit = 0.7710 219.6289 y = 287.0707 y = 287.0700

21   Pass
assert(isequal(celsius_to_franklin(-502.42,-588.56,-206.72,-98.65,321.02),775.70))

linfit = 1.6568 243.8397 y = 775.6994 y = 775.7000

22   Pass
assert(isequal(celsius_to_franklin(-153.74,7.78,-682.05,-719.25,120.16),384.71))

linfit = 1.3761 219.3482 y = 384.7055 y = 384.7100

23   Pass
assert(isequal(celsius_to_franklin(-144.83,-134.94,-189.12,-37.86,-515.74),678.06))

linfit = -2.1919 -452.3953 y = 678.0639 y = 678.0600

24   Pass
assert(isequal(celsius_to_franklin(-995.20,151.44,-741.17,-470.43,-406.85),-1288.85))

linfit = 1.0e+03 * -0.0024 -2.2848 y = -1.2889e+03 y = -1.2888e+03

25   Pass
assert(isequal(celsius_to_franklin(871.26,-14.30,236.99,-926.20,-443.03),-1903.88))

linfit = 1.0e+03 * 0.0014 -1.2669 y = -1.9039e+03 y = -1.9039e+03

26   Pass
assert(isequal(celsius_to_franklin(715.15,782.47,47.57,-466.79,44.72),-472.12))

linfit = 1.8713 -555.8090 y = -472.1233 y = -472.1200

27   Pass
assert(isequal(celsius_to_franklin(899.12,-837.45,-191.19,-256.33,-293.28),-201.92))

linfit = -0.5330 -358.2316 y = -201.9175 y = -201.9200

28   Pass
assert(isequal(celsius_to_franklin(-202.59,-537.15,-192.74,407.01,299.90),47628.43))

linfit = 1.0e+04 * 0.0096 1.8882 y = 4.7628e+04 y = 4.7628e+04

29   Pass
assert(isequal(celsius_to_franklin(913.66,334.21,33.59,-112.18,-55.21),-157.22))

linfit = 0.5072 -129.2176 y = -157.2212 y = -157.2200

30   Pass
assert(isequal(celsius_to_franklin(955.44,756.25,-738.91,-848.13,114.84),-39.71))

linfit = 0.9469 -148.4561 y = -39.7141 y = -39.7100

31   Pass
assert(isequal(celsius_to_franklin(-666.83,-718.81,55.93,-298.83,-586.09),-671.89))

linfit = 0.5811 -331.3297 y = -671.8938 y = -671.8900

32   Pass
assert(isequal(celsius_to_franklin(147.36,-107.49,37.96,373.14,543.46),-1847.69))

linfit = -4.3933 539.9107 y = -1.8477e+03 y = -1.8477e+03

33   Pass
assert(isequal(celsius_to_franklin(-187.90,-485.31,-936.87,953.10,-349.60),-174.76))

linfit = -1.9205 -846.1752 y = -174.7623 y = -174.7600

34   Pass
assert(isequal(celsius_to_franklin(-341.01,93.29,-190.04,507.03,-51.48),886.76))

linfit = 1.0e+03 * 0.0027 1.0278 y = 886.7598 y = 886.7600

35   Pass
assert(isequal(celsius_to_franklin(584.80,435.13,-16.48,-899.54,29.33),-797.85))

linfit = 2.2197 -862.9591 y = -797.8549 y = -797.8500

36   Pass
assert(isequal(celsius_to_franklin(-340.40,903.99,-371.65,-204.97,884.36),44366.71))

linfit = 1.0e+04 * 0.0035 1.2984 y = 4.4367e+04 y = 4.4367e+04

37   Pass
assert(isequal(celsius_to_franklin(-781.65,-583.60,127.07,910.74,-822.91),-651.45))

linfit = 1.6444 701.7804 y = -651.4498 y = -651.4500

38   Pass
assert(isequal(celsius_to_franklin(-386.75,-935.79,531.29,-280.34,-408.39),-951.24))

linfit = 0.7140 -659.6634 y = -951.2402 y = -951.2400

39   Pass
assert(isequal(celsius_to_franklin(161.90,440.48,-210.43,-49.91,269.72),582.49))

linfit = 1.3171 227.2441 y = 582.4880 y = 582.4900

40   Pass
assert(isequal(celsius_to_franklin(-748.00,558.83,611.62,-70.60,-33.59),228.10))

linfit = -0.4629 212.5467 y = 228.0971 y = 228.1000

41   Pass
assert(isequal(celsius_to_franklin(657.96,-975.96,777.84,21.10,-407.55),-9837.97))

linfit = 1.0e+03 * 0.0083 -6.4483 y = -9.8380e+03 y = -9.8380e+03

42   Pass
assert(isequal(celsius_to_franklin(-230.46,-919.89,-284.33,499.32,-234.82),-805.03))

linfit = 1.0e+03 * -0.0263 -6.9914 y = -805.0254 y = -805.0300

43   Pass
assert(isequal(celsius_to_franklin(-301.12,-825.93,814.58,-552.94,507.82),-628.00))

linfit = 0.2447 -752.2518 y = -627.9982 y = -628

44   Pass
assert(isequal(celsius_to_franklin(697.75,701.18,10.89,34.27,653.33),658.05))

linfit = 0.9710 23.6963 y = 658.0502 y = 658.0500

45   Pass
assert(isequal(celsius_to_franklin(280.00,888.78,-786.06,403.46,708.18),1083.71))

linfit = 0.4552 761.3110 y = 1.0837e+03 y = 1.0837e+03

46   Pass
assert(isequal(celsius_to_franklin(-10.67,543.28,264.36,637.92,894.65),854.81))

linfit = 0.3441 546.9516 y = 854.8078 y = 854.8100

47   Pass
assert(isequal(celsius_to_franklin(-206.85,153.56,-128.64,-453.56,89.79),-2149.16))

linfit = 1.0e+03 * -0.0078 -1.4522 y = -2.1492e+03 y = -2.1492e+03

48   Pass
assert(isequal(celsius_to_franklin(-76.51,-747.71,305.05,982.05,-576.62),-3014.90))

linfit = 4.5334 -400.8604 y = -3.0149e+03 y = -3.0149e+03

49   Pass
assert(isequal(celsius_to_franklin(292.10,-573.74,-958.20,-149.66,113.10),-513.03))

linfit = -0.3392 -474.6648 y = -513.0263 y = -513.0300

50   Pass
assert(isequal(celsius_to_franklin(792.56,-79.19,-775.41,-838.95,-698.15),-801.51))

linfit = 0.4846 -463.2250 y = -801.5137 y = -801.5100

51   Pass
assert(isequal(celsius_to_franklin(-396.81,922.69,629.52,-216.29,678.00),-270.09))

linfit = -1.1098 482.3261 y = -270.0912 y = -270.0900

52   Pass
assert(isequal(celsius_to_franklin(-517.35,852.83,-16.57,-944.12,849.97),-4053.53))

linfit = 1.0e+03 * -0.0036 -1.0036 y = -4.0535e+03 y = -4.0535e+03

53   Pass
assert(isequal(celsius_to_franklin(-434.10,504.36,-908.25,-132.70,317.96),1514.82))

linfit = 1.0e+03 * 0.0013 1.0876 y = 1.5148e+03 y = 1.5148e+03

54   Pass
assert(isequal(celsius_to_franklin(829.18,913.01,168.51,348.27,731.39),829.42))

linfit = 0.8548 204.2278 y = 829.4192 y = 829.4200

55   Pass
assert(isequal(celsius_to_franklin(-333.40,-166.89,-456.37,639.93,-427.43),450.05))

linfit = 1.0e+03 * -0.0066 -2.3544 y = 450.0514 y = 450.0500

56   Pass
assert(isequal(celsius_to_franklin(-294.90,-60.17,550.47,304.60,671.10),356.65))

linfit = 0.4315 67.0769 y = 356.6508 y = 356.6500

57   Pass
assert(isequal(celsius_to_franklin(485.15,789.20,766.49,210.31,465.73),829.16))

linfit = 1.0e+03 * -0.0021 1.7875 y = 829.1589 y = 829.1600

58   Pass
assert(isequal(celsius_to_franklin(203.09,-17.32,914.47,-533.31,-199.58),274.75))

linfit = -0.7253 129.9886 y = 274.7513 y = 274.7500

59   Pass
assert(isequal(celsius_to_franklin(966.57,445.31,-794.28,-130.59,-831.11),-142.64))

linfit = 0.3271 129.1856 y = -142.6355 y = -142.6400

60   Pass
assert(isequal(celsius_to_franklin(-738.77,-731.47,-714.39,984.04,-269.54),32286.12))

linfit = 1.0e+04 * 0.0070 5.1252 y = 3.2286e+04 y = 3.2286e+04

61   Pass
assert(isequal(celsius_to_franklin(930.51,64.10,-449.17,775.23,87.89),498.41))

linfit = -0.5154 543.7138 y = 498.4126 y = 498.4100

62   Pass
assert(isequal(celsius_to_franklin(-868.15,640.06,347.72,-454.46,17.03),-156.77))

linfit = -0.9002 -141.4442 y = -156.7745 y = -156.7700

63   Pass
assert(isequal(celsius_to_franklin(-937.82,569.83,-404.13,866.50,-171.47),995.83))

linfit = 1.0e+03 * 0.0006 1.0911 y = 995.8321 y = 995.8300

64   Pass
assert(isequal(celsius_to_franklin(-169.08,901.62,-131.93,-661.45,-597.44),18924.68))

linfit = 1.0e+03 * -0.0421 -6.2123 y = 1.8925e+04 y = 1.8925e+04

65   Pass
assert(isequal(celsius_to_franklin(-189.62,-713.35,-270.02,-220.67,637.73),-5783.24))

linfit = 1.0e+03 * -0.0061 -1.8753 y = -5.7832e+03 y = -5.7832e+03

66   Pass
assert(isequal(celsius_to_franklin(492.42,-319.45,141.79,288.15,113.21),337.68))

linfit = -1.7329 533.8552 y = 337.6757 y = 337.6800

67   Pass
assert(isequal(celsius_to_franklin(283.90,-538.88,-437.08,918.34,-115.93),269.24))

linfit = -2.0212 34.9289 y = 269.2427 y = 269.2400

68   Pass
assert(isequal(celsius_to_franklin(-306.06,561.45,469.95,418.77,357.52),439.44))

linfit = -0.1839 505.1767 y = 439.4418 y = 439.4400

69   Pass
assert(isequal(celsius_to_franklin(-750.15,755.17,-347.75,-855.09,549.57),-4445.84))

linfit = 1.0e+03 * -0.0040 -2.2467 y = -4.4458e+03 y = -4.4458e+03

70   Pass
assert(isequal(celsius_to_franklin(-522.01,440.91,261.38,-459.71,195.94),-384.48))

linfit = -1.1496 -159.2159 y = -384.4773 y = -384.4800

71   Pass
assert(isequal(celsius_to_franklin(741.61,107.09,454.92,-904.42,-603.83),-4639.94))

linfit = 1.0e+03 * 0.0035 -2.5095 y = -4.6399e+03 y = -4.6399e+03

72   Pass
assert(isequal(celsius_to_franklin(91.21,547.62,235.88,78.98,176.30),271.98))

linfit = -3.2394 843.0832 y = 271.9818 y = 271.9800

73   Pass
assert(isequal(celsius_to_franklin(970.32,-331.81,24.95,989.19,396.94),469.39))

linfit = 1.0e+03 * -0.0014 1.0241 y = 469.3948 y = 469.3900

74   Pass
assert(isequal(celsius_to_franklin(573.18,-145.55,-501.14,406.38,-809.38),564.74))

linfit = -0.5137 148.9202 y = 564.7378 y = 564.7400

75   Pass
assert(isequal(celsius_to_franklin(674.12,182.10,-769.93,-438.99,216.83),-14.58))

linfit = 0.4301 -107.8409 y = -14.5817 y = -14.5800

76   Pass
assert(isequal(celsius_to_franklin(-501.54,364.36,122.84,736.62,105.33),726.18))

linfit = 0.5962 663.3819 y = 726.1804 y = 726.1800

77   Pass
assert(isequal(celsius_to_franklin(423.69,-98.78,-153.62,-130.92,663.06),-85.45))

linfit = 0.0557 -122.3677 y = -85.4538 y = -85.4500

78   Pass
assert(isequal(celsius_to_franklin(796.67,-66.87,908.68,-989.81,987.42),-1638.61))

linfit = 1.0e+03 * -0.0082 6.4975 y = -1.6386e+03 y = -1.6386e+03

79   Pass
assert(isequal(celsius_to_franklin(652.08,797.79,-377.24,-59.91,-383.42),-65.06))

linfit = 0.8333 254.4322 y = -65.0596 y = -65.0600

80   Pass
assert(isequal(celsius_to_franklin(-965.37,-955.60,-397.18,361.85,-445.66),249.44))

linfit = 1.0e+03 * 0.0023 1.2828 y = 249.4405 y = 249.4400

81   Pass
assert(isequal(celsius_to_franklin(47.99,766.77,932.43,-754.90,521.98),-48.72))

linfit = -1.7205 849.3363 y = -48.7250 y = -48.7200

82   Pass
assert(isequal(celsius_to_franklin(511.24,231.31,-85.92,-985.28,-611.87),-2056.79))

linfit = 2.0373 -810.2358 y = -2.0568e+03 y = -2.0568e+03

83   Pass
assert(isequal(celsius_to_franklin(768.55,-217.35,-262.56,-220.12,515.30),-218.03))

linfit = 0.0027 -219.4147 y = -218.0303 y = -218.0300

84   Pass
assert(isequal(celsius_to_franklin(-413.15,-952.69,133.75,-922.77,-505.69),-957.75))

linfit = 0.0547 -930.0872 y = -957.7527 y = -957.7500

85   Pass
assert(isequal(celsius_to_franklin(188.47,610.83,837.90,81.43,134.78),654.60))

linfit = -0.8152 764.4663 y = 654.5968 y = 654.6000

86   Pass
assert(isequal(celsius_to_franklin(-574.69,934.83,-668.57,-702.77,408.89),18091.95))

linfit = 1.0e+04 * 0.0017 1.0959 y = 1.8092e+04 y = 1.8092e+04

87   Pass
assert(isequal(celsius_to_franklin(-485.25,-858.09,-316.38,869.88,-25.16),3849.80))

linfit = 1.0e+03 * 0.0102 4.1073 y = 3.8498e+03 y = 3.8498e+03

88   Pass
assert(isequal(celsius_to_franklin(-723.68,-261.45,-214.48,-33.00,-356.68),-96.80))

linfit = 0.4486 63.2254 y = -96.7973 y = -96.8000

89   Pass
assert(isequal(celsius_to_franklin(264.40,131.68,-304.40,-659.34,772.14),837.78))

linfit = 1.3907 -236.0164 y = 837.7849 y = 837.7800

90   Pass
assert(isequal(celsius_to_franklin(-927.25,687.47,846.53,-842.40,758.80),-766.73))

linfit = -0.8625 -112.2752 y = -766.7336 y = -766.7300

91   Pass
assert(isequal(celsius_to_franklin(-874.43,-518.50,179.50,46.43,232.70),74.95))

linfit = 0.5360 -49.7860 y = 74.9464 y = 74.9500

92   Pass
assert(isequal(celsius_to_franklin(-541.26,-857.08,-142.04,-777.46,25.32),-744.08))

linfit = 0.1994 -749.1317 y = -744.0819 y = -744.0800

93   Pass
assert(isequal(celsius_to_franklin(363.20,879.66,545.24,-99.49,-34.24),3017.40))

linfit = 1.0e+03 * -0.0054 2.8332 y = 3.0174e+03 y = 3.0174e+03

94   Pass
assert(isequal(celsius_to_franklin(166.07,415.49,693.31,-912.26,-204.72),1349.25))

linfit = -2.5183 833.7046 y = 1.3493e+03 y = 1.3492e+03

95   Pass
assert(isequal(celsius_to_franklin(587.20,644.09,-450.02,764.92,143.15),695.82))

linfit = -0.1165 712.4953 y = 695.8192 y = 695.8200

96   Pass
assert(isequal(celsius_to_franklin(-881.13,477.87,733.74,533.48,346.53),520.15))

linfit = 0.0344 508.2128 y = 520.1460 y = 520.1500

97   Pass
assert(isequal(celsius_to_franklin(21.10,833.97,33.12,94.93,-522.20),34238.33))

linfit = 1.0e+03 * -0.0615 2.1313 y = 3.4238e+04 y = 3.4238e+04

98   Pass
assert(isequal(celsius_to_franklin(129.18,-721.79,-176.17,715.01,589.38),-2887.22))

linfit = -4.7054 -113.9438 y = -2.8872e+03 y = -2.8872e+03

99   Pass
assert(isequal(celsius_to_franklin(453.99,259.96,-596.74,279.21,-811.28),283.14))

linfit = -0.0183 268.2774 y = 283.1405 y = 283.1400

100   Pass
assert(isequal(celsius_to_franklin(369.37,958.33,-425.57,-338.45,769.98),1611.84))

linfit = 1.6313 355.7793 y = 1.6118e+03 y = 1.6118e+03

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!