Cody

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

Solution 2187749

Submitted on 2 Apr 2020 by Yaroslav Br
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))

ans = 1.0e+03 * -0.000724952741021 1.382079867674859 y = 6.702300000000000e+02

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

ans = 1.0e+02 * 0.008808140447850 -5.712968345843409 y = -61.990000000000002

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

ans = 1.0e+02 * 0.019836989978085 7.283785622122085 y = 2.001060000000000e+03

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

ans = 1.0e+03 * 0.007710589651023 3.737688832731655 y = 4.940540000000000e+03

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

ans = 1.0e+03 * 0.003850959132611 1.498601718932444 y = -2.532400000000000e+02

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

ans = 1.0e+02 * -0.009329339827225 -4.521618114757012 y = -1.220790000000000e+03

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

ans = 1.0e+02 * 0.005783709787817 3.186660643394934 y = 59.909999999999997

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

ans = 1.0e+02 * -0.000744879122440 3.489864760907380 y = 2.799800000000000e+02

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

ans = 1.0e+02 * 0.020733818986231 4.333314417025819 y = -5.876400000000000e+02

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

ans = 0.506271650463739 -92.062324282042681 y = 94.500000000000000

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

ans = 1.0e+02 * 0.013623534442821 6.138474915362959 y = -2.856300000000000e+02

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

ans = 1.0e+02 * 0.000941814297519 8.353267898099443 y = 7.537000000000000e+02

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

ans = -0.295136432153075 6.381341864829079 y = -1.574300000000000e+02

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

ans = 1.0e+02 * 0.032752185286799 9.254018008677342 y = -1.829060000000000e+03

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

ans = 1.0e+02 * 0.009174095554534 2.330582154352760 y = -3.084300000000000e+02

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

ans = 1.0e+03 * 0.003883684001588 2.122348666137349 y = 1.225570000000000e+03

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

ans = 1.0e+02 * -0.039135581555403 -3.042490488644183 y = 2.093470000000000e+03

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

ans = 1.0e+02 * -0.004718424766273 -6.337617353148703 y = -4.658300000000000e+02

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

ans = 1.0e+03 * -0.002547302614322 2.742293378071173 y = 4.113840000000000e+03

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

ans = 1.0e+02 * 0.007710283787239 2.196288538331366 y = 2.870700000000000e+02

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

ans = 1.0e+02 * 0.016567805207981 2.438396692593845 y = 7.757000000000000e+02

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

ans = 1.0e+02 * 0.013761427949499 2.193481932956032 y = 3.847100000000000e+02

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

ans = 1.0e+02 * -0.021919169112667 -4.523953262587488 y = 6.780599999999999e+02

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

ans = 1.0e+03 * -0.002448017950636 -2.284827464472700 y = -1.288850000000000e+03

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

ans = 1.0e+03 * 0.001437715799265 -1.266924267267883 y = -1.903880000000000e+03

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

ans = 1.0e+02 * 0.018713262829923 -5.558089912819437 y = -4.721200000000000e+02

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

ans = 1.0e+02 * -0.005329860314956 -3.582315993616494 y = -2.019200000000000e+02

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

ans = 1.0e+04 * 0.009585380710660 1.888187278172586 y = 4.762843000000000e+04

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

ans = 1.0e+02 * 0.005072210165101 -1.292175539445726 y = -1.572200000000000e+02

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

ans = 1.0e+02 * 0.009468999911470 -1.484561275415351 y = -39.710000000000001

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

ans = 1.0e+02 * 0.005810780895456 -3.313296975482871 y = -6.718900000000000e+02

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

ans = 1.0e+02 * -0.043933272394881 5.399107020109689 y = -1.847690000000000e+03

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

ans = 1.0e+02 * -0.019205175107147 -8.461752402632948 y = -1.747600000000000e+02

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

ans = 1.0e+03 * 0.002740544479036 1.027843072795920 y = 8.867600000000000e+02

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

ans = 1.0e+02 * 0.022197146088345 -8.629591032464075 y = -7.978500000000000e+02

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

ans = 1.0e+04 * 0.003548672000000 1.298366948799999 y = 4.436671000000000e+04

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

ans = 1.0e+02 * 0.016444449335329 7.017803822959767 y = -6.514500000000000e+02

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

ans = 1.0e+02 * 0.007139667116901 -6.596633742538451 y = -9.512400000000000e+02

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

ans = 1.0e+02 * 0.013170843069320 2.272440507077055 y = 5.824900000000000e+02

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

ans = 1.0e+02 * -0.004629455288978 2.125467443844603 y = 2.281000000000000e+02

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

ans = 1.0e+03 * 0.008317150483817 -6.448312332332337 y = -9.837969999999999e+03

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

ans = 1.0e+03 * -0.026345090031557 -6.991379448672733 y = -8.050300000000000e+02

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

ans = 1.0e+02 * 0.002446804696603 -7.522518169758896 y = -628

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

ans = 0.970954779722214 23.696302448825087 y = 6.580500000000000e+02

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

ans = 1.0e+02 * 0.004552464214022 7.613110020073916 y = 1.083710000000000e+03

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

ans = 1.0e+02 * 0.003441079155001 5.469516314583863 y = 8.548099999999999e+02

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

ans = 1.0e+03 * -0.007762690193070 -1.452152466436517 y = -2.149160000000000e+03

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

ans = 1.0e+02 * 0.045333892441556 -4.008603889296571 y = -3.014900000000000e+03

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

ans = 1.0e+02 * -0.003391825961769 -4.746647636567223 y = -5.130300000000000e+02

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

ans = 1.0e+02 * 0.004845500870552 -4.632250169964987 y = -8.015100000000000e+02

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

ans = 1.0e+02 * -0.011097600187074 4.823261269767033 y = -2.700900000000000e+02

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

ans = 1.0e+03 * -0.003588302248492 -1.003578168257518 y = -4.053530000000000e+03

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

ans = 1.0e+03 * 0.001343583254244 1.087609490667511 y = 1.514820000000000e+03

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

ans = 1.0e+02 * 0.008547989162517 2.042278346224288 y = 8.294200000000000e+02

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

ans = 1.0e+03 * -0.006561112466455 -2.354364896316172 y = 4.500500000000000e+02

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

ans = 0.431491536250399 67.076854040242722 y = 3.566500000000000e+02

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

ans = 1.0e+03 * -0.002057617118078 1.787452944835430 y = 8.291600000000000e+02

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

ans = 1.0e+02 * -0.007253366695718 1.299886242233407 y = 2.747500000000000e+02

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

ans = 1.0e+02 * 0.003270579549649 1.291855924695460 y = -1.426400000000000e+02

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

ans = 1.0e+04 * 0.007036546349467 5.125242346595587 y = 3.228612000000000e+04

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

ans = 1.0e+02 * -0.005154311144613 5.437138063174070 y = 4.984100000000000e+02

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

ans = 1.0e+02 * -0.009001949221545 -1.414442216684349 y = -1.567700000000000e+02

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

ans = 1.0e+03 * 0.000555884502239 1.091149603889898 y = 9.958300000000000e+02

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

ans = 1.0e+03 * -0.042074562584118 -6.212347041722742 y = 1.892468000000000e+04

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

ans = 1.0e+03 * -0.006127860696517 -1.875314945273630 y = -5.783240000000000e+03

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

ans = 1.0e+02 * -0.017328808145338 5.338551706927530 y = 3.376800000000000e+02

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

ans = -2.021165635662571 34.928923964603712 y = 2.692400000000000e+02

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

ans = 1.0e+02 * -0.001838636100050 5.051767035218618 y = 4.394400000000000e+02

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

ans = 1.0e+03 * -0.004001640159046 -2.246660365308151 y = -4.445840000000000e+03

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

ans = 1.0e+02 * -0.011496444938026 -1.592159222098827 y = -3.844800000000000e+02

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

ans = 1.0e+03 * 0.003528236073808 -2.509485154696712 y = -4.639940000000000e+03

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

ans = 1.0e+02 * -0.032393723646921 8.430831533835628 y = 2.719800000000000e+02

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

ans = 1.0e+03 * -0.001397336492590 1.024053545490126 y = 4.693900000000000e+02

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

ans = 1.0e+02 * -0.005137482314394 1.489202112964480 y = 5.647400000000000e+02

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

ans = 1.0e+02 * 0.004301028357744 -1.078409236522281 y = -14.580000000000000

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

ans = 1.0e+02 * 0.005962074377783 6.633818783433165 y = 7.261799999999999e+02

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

ans = 1.0e+02 * 0.000556719959814 -1.223676679773432 y = -85.450000000000003

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

ans = 1.0e+03 * -0.008239800017856 6.497531480224972 y = -1.638610000000000e+03

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

ans = 1.0e+02 * 0.008332685656550 2.544322337076905 y = -65.060000000000002

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

ans = 1.0e+03 * 0.002318678611028 1.282782770728102 y = 2.494400000000000e+02

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

ans = 1.0e+02 * -0.017204898014563 8.493363055718874 y = -48.719999999999999

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

ans = 1.0e+02 * 0.020372931877554 -8.102357693080581 y = -2.056790000000000e+03

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

ans = 1.0e+02 * 0.000026864253086 -2.194146521709614 y = -2.180300000000000e+02

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

ans = 1.0e+02 * 0.000547083561894 -9.300872426403362 y = -9.577500000000000e+02

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

ans = 1.0e+02 * -0.008151763854457 7.644662933649511 y = 6.546000000000000e+02

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

ans = 1.0e+04 * 0.001744354495100 1.095946084789092 y = 1.809195000000000e+04

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

ans = 1.0e+03 * 0.010232545745248 4.107252822881505 y = 3.849800000000000e+03

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

ans = 0.448644933228594 63.225365278868807 y = -96.799999999999997

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

ans = 1.0e+02 * 0.013906821378340 -2.360163572433192 y = 8.377800000000000e+02

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

ans = 1.0e+02 * -0.008624914025415 -1.122751530065735 y = -7.667300000000000e+02

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

ans = 0.536022316472631 -49.786005806837267 y = 74.950000000000003

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

ans = 1.0e+02 * 0.001994389058664 -7.491316978107310 y = -7.440800000000000e+02

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

ans = 1.0e+03 * -0.005378762909251 2.833226688639860 y = 3.017400000000000e+03

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

ans = 1.0e+02 * -0.025183028601775 8.337045559896819 y = 1.349250000000000e+03

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

ans = 1.0e+02 * -0.001164940899713 7.124953296311293 y = 6.958200000000001e+02

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

ans = 1.0e+02 * 0.000344362084874 5.082127763844768 y = 5.201500000000000e+02

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

ans = 1.0e+03 * -0.061484193011647 2.131286472545758 y = 3.423833000000000e+04

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

ans = 1.0e+02 * -0.047054200098248 -1.139438431308332 y = -2.887220000000000e+03

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

ans = 1.0e+02 * -0.000183205961570 2.682773674492972 y = 2.831400000000000e+02

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

ans = 1.0e+02 * 0.016312929277681 3.557793312702846 y = 1.611840000000000e+03

Suggested Problems

More from this Author19

Community Treasure Hunt

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

Start Hunting!