Basic commands:
input( prompt )
disp( data )
prompt = 'What is the current temperature (in degrees Fahrenheit)? '; currTempF = input(prompt); currTempC = (5/9) * (currTempF - 32); disp(['The current temperature is ', num2str(currTempC), ' Celsius'])
grades = input('Enter the scores: '); disp(['Average score = ', num2str(sum(grades)/length(grades))])
outFile = input('Enter filename: ', 's'); disp(['About to open ', outFile])
choice = menu('Choose color:', 'red', 'blue', 'black', 'green'); colorOpts = ['r', 'b', 'k', 'g']; plot(x, y, colorOpts(choice))
File format (for basic file I/O):
varName = load( filename )
save( filename, varName, '-ascii' )