hey there people!
well, I've got here some code for a program I'm doing and was wondering if you could help me.
well, the problem here is that to run this program i can read from 3 different files , "analise.txt", "computacao.txt" and "fisica.txt".Code:function disciplinas=ler_disciplinas(ficheiro) fid2=fopen(ficheiro,"r"); xx=list(); while !feof(fid2) a=ler_disciplina(fid2); xx=append(xx,a); endwhile fclose(fid2); disciplinas=xx; endfunction
What I want is to, for ex., if I run :
all the read data is added to a list named analise.
If I run:
all the read data is added to a list named computacao.
Now the program is always adding the data to the list "disciplinas", always overwriting...
So, can you guys help me?
thanks in advance