I have a very simple program. As you can see this program asks for two inputs and store the values in txt file.
ParticipantID = input ('Please, enter your initials ', 's'); ParticipantAge = input ('Please, enter your age ', 's');fileID = fopen([ParticipantID '.txt'],'at');header = ['ID\t' 'Age\n'];Participant_info =[ParticipantID '\t' ParticipantAge '\n'];fprintf(fileID,Participant_info);
The text file is saved in the folder where the .m file is but I would like to save the text in a subfolder that I have created (let's say 'info'). Any idea about how to do this?
Thanks!
Best Answer