Problem 2415. Temperature Conversion Utility (Strings)

Created by goc3 in Community

This is a follow-on problem to Problem 2413: Temperature Conversion Utility.

You are provided a cell array of strings that contains the source temperature and units (in various formats) and a separate cell array of strings that contains the target temperature units (in various formats). Produce a numerical vector of converted temperature values.


 T_in  = {'100 Celsius', '50degF', '90K', strcat('111',char(176),'R')};  
 T_to  = {'R','C','degF','kelvin'}; 
 T_out = [671.67 10 -297.67 61.6666667];

For reference, temperature conversion formulas are available on Wikipedia.

Solution Stats

52.17% Correct | 47.83% Incorrect
Last solution submitted on Apr 02, 2019