You say you are to convert temps from 0 to 100 with interval of 5 degrees, but then set up your for loop using 1:5:100. You are not converting 0, 5, 10, ... but instead 1, 6, 11, ...
Also, you have set up your function to return two variables
function [kelvin, farenheit] = temperatureconvert(celcius)
but are only assigning its output to one.
temp = temperatures(choice);
[tempK, tempF] = temperatures(choice);
or have the function return a vector containing both values
function out = temperatureconvert(celcius)
kelvin = celcius + 273;
farenheit = (9./5).*(celcius + 2);
out = [kelvin, farenheit];
end
Also note that your function is called temperatureconvert but when you call it, you are using the name temperatures. These should be the same, and should be whatever name you used in the function declaration line (temperatureconvert here).
Best Answer