1- We talked about the built-in MATLAB function 'input' to prompt to user for input. 2- We also talked about how to use 'fprintf' built-in function to write formatted output into a text file. We combined the two topics and wrote a script M-file('promptToUser.m') to get team information from a user and write the information into a file named 'myteams.txt' Prof. Aydin ps. The beginning part of the MATLAB session we studied in during the lecture, is lost due to network connectivity :(. But what ever is below should cover most of what I introduced in this lecture. ...... >> !more promptToUser.m fid = fopen('myteams.txt','w'); cont = true; while (cont == true) team = input('Enter the team:'); capacity = input('Enter the capacity:'); fprintf(fid,'%s %d', team, capacity) cont = input('Do you want to continue [true/false]'); end fclose(fid); >> promptToUser Enter the team:'Eagles' Enter the capacity:70000 ans = 12 Do you want to continue [true/false]true Enter the team:'Blue Hens' Enter the capacity:30000 ans = 15 Do you want to continue [true/false]1 Enter the team:'Galatasaray' Enter the capacity:40000 ans = 17 Do you want to continue [true/false]false >> !more myteams.txt Eagles 70000Blue Hens 30000Galatasaray 40000 >> exit