Write a subfunction named converter that converts temperatures from Celsius to
Fahrenheit (and vice versa). The first argument should be the “from” unit (a character in
quotes), the second the “to” unit (a character in quotes), and the third the value (or
values) to be converted. Ex:
temp_ans=converter(‘C’, ‘F’, [50 75 100])
and the answer should be temp_ans=[122 167 212]. If an incorrect unit is input (ex: ‘K’),
there should be an error message displayed. Returning an empty variable to the main
workspace is allowed.
Test this function using multiples of 10 from 0 to 100 for Celsius to Fahrenheit, and
values spaced 18 degrees apart from 32 to 212 for Fahrenheit to Celsius. Test an input of
(‘K’, ‘F’, [100]). Display your answers. Be efficient.
Can you do this with an anonymous function? Why or why not?