Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
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];
eps = 1e-3;
assert(sum(abs(T_convertor_str(T_in,T_to)-T_out)) < eps)
|
2 | Pass |
T_in = {'10C','20degC','30 Celsius','40 Centigrade',strcat('50',char(176),'C'),'60K','70 kelvin','80 FAHRENHEIT'};
T_to = {'R','R','Rankine','deg R','R','R',strcat(char(176),'R'),'degR'};
T_out = [509.67 527.67 545.67 563.67 581.67 108 126 539.67];
eps = 1e-3;
assert(sum(abs(T_convertor_str(T_in,T_to)-T_out)) < eps)
|
3 | Pass |
T_in = {'100 DEGREES RANKINE','100degC','100K','100F','1000R','1000 centigrade','1000 deg F','1000 kelvin'};
T_to = {'C','degC',strcat(char(176),'C'),'Celsius','centigrade','deg C','degrees Celsius','CENTIGRADE'};
T_out = [-217.5944444 100 -173.15 37.7777778 282.4055556 1000 537.7777778 726.85];
eps = 1e-3;
assert(sum(abs(T_convertor_str(T_in,T_to)-T_out)) < eps)
|
4106 Solvers
Project Euler: Problem 6, Natural numbers, squares and sums.
1018 Solvers
464 Solvers
484 Solvers
Create a matrix with difference of each row of input matrix
62 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!