Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
How to Have an ANSWER that would depend upon the LETTER of your INPUT? Plz help me. thank you
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Kaye Freyssinet Abanggan
el 15 de Sept. de 2016
Cerrada: MATLAB Answer Bot
el 20 de Ag. de 2021
This is for Celsius to Fahrenheit and vise versa. how to have a Fahrenheit answer if I input Example: 32 C? This is my code and i dont have any idea how. =( thanks for the help in advance
A=input('input:'); if A=input('##F') F=1.8*C+32 elseif A=input('##C') C=(F-32)*5/9 end
3 comentarios
Steven Lord
el 15 de Sept. de 2016
A couple of functions or keywords that may be of use to you are isequal, switch and case, lower, and/or upper.
Respuestas (1)
Renato Agurto
el 15 de Sept. de 2016
Editada: Renato Agurto
el 15 de Sept. de 2016
Here is a little help
function output = your_function(str)
unit = str(end); %should be 'F' or 'C'
val = str2double(str(1:end-1)); %should be a number
%Your computation comes here:
% output = ....
end
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!