Ältere Kommentare anzeigen
Hi, I need to open a data file several times and import the data. In a loop I use the following:
temp2 =importdata('C:\Tmp2.txt', DELIMITER);
data2(i)= temp2;
fid = fopen('C:\Tmp2.txt');
temp = textscan(fid,'%*s %d %d %d %d',4,'headerlines',4,'delimiter','\t');
data4(:,:,i)=cell2mat(temp)
Im not sure of the syntax to clear data4 as sometimes if i run again and the number of loops "i" is lower than previous, it keeps data from the previous execution. Any help would be greatly appreciated
4 Kommentare
Oleg Komarov
am 4 Mai 2011
Not clear why would you want to wipe the content off.
Post the loop please to understand why happens what you said.
Jason
am 4 Mai 2011
Oleg Komarov
am 4 Mai 2011
clear data4?
Jason
am 4 Mai 2011
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Whos finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!