Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Problems with Displying Function Output
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
hey, guys! this is my first post, so watch out. I'm having displaying my result in matlab for this program i'm trying to make that converts grams of an element (in this case Helium) to moles of that element. I'm not really a programmer but i thought it would be fun. I'm trying to get the program to divide the input of "grams" by 4. but it's not working. any advice? thanks
elmnt = input('what is the element? ','s');
grams = input ('how many grams?');
if strcmp(elmnt, 'He')
disp (grams/4)
else disp (' that''s not the right element')
end
Respuestas (0)
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!