How can i load .txt files from folder with a loop?
Show older comments
Hello guys, i have a question. I have a folder with .txt files. How can i load the .txt files from folder with a loop?
For example the folder constists of 5 txt files i.e O1.txt, O2.txt , O3.txt, O4.txt, O5.txt, i want a code to take my function each time one txt file, giving me my result and after take automatically the second .txt file and so on.
And something else, when i have a .txt file with 7543 entries, how can i round the entries to 7000, also i want to do this in random number of entries and each time to rounding the entries in the previous thousand.
Thanks a lot,
2 Comments
Walter Roberson
on 29 Jan 2021
nrow = size(YourData,1);
newsize = floor(nrow/1000)*1000;
NewData = YourData(1:newsize,:);
Andreas Parlani
on 1 Feb 2021
Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!