how to delete column from text file without loading it into a matrix first
2 views (last 30 days)
Show older comments
I have the code as follows:
fid = fopen('5_prcnt_noised_iono_train_data.txt','w+');
for i = 1:Ntrain_data
fprintf(fid,'\n%6.2f',noised_train_data(i));
for j = 1:Nof_noised_train_feat
fprintf(fid,'\t%6.2f',noised_train_data(i,j));
end
end
in this , I have write the train data into a text file from train_data matrix.... The problem is, when writing the data in the text file,it also print an extra first column in the start of each row....and I don't want this extra first column....
I have to delete that column but the format of fprintf func does not allow me to do this.....
There is need to make change in the 3rd line of code:
fprintf(fid,'\n%6.2f',noised_train_data(i));
this syntax add an extra first column in each row.....
how to fix it??..
0 Comments
Answers (1)
See Also
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!