I have a Matlab application that generates a output matrix based on user input. I want to save it to a file or files. There are two ways I have in mind:
Multiple files; one matrix per file
user1.mat
user2.mat
....
Single file allUser.mat with multiple matrix
user1=[data1]
user1=[data2]
....
However I don’t know how to keep track of the number, because every user will start a new instance of the application. Any idea how to do this?
One way is to simply edit (or create, if it’s not there already) the
startup.mfile to ask the user for their user id, and then use that to load the correct file:Another way would be to use the unix
whoamifunction, if each user uses their own logon: