how to overcome the memory limitation of importdata function?
5 views (last 30 days)
Show older comments
1.I 've a text file(size 300 MB) containing Headerlines up to 3 rows followed by numerical data(2 lakhs lines roughly), i'm not able to import the data using importdata function.It works well if the size of the file is less than 50 MB.Since the output of the importdata function suits very well for my code, i need a similar function which provides same sort of out put(textdata, data separately) or is there any ways to optimize the importdata function by editing it.
2.At times i happen to open 'n' number of text files from a folder,do analyze the data and save necessary values in different file.I get memory error,though i clear all the variables in the end of every loop.I could avoid this by restarting the MATLAB every time.I wonder if there is any other way around???
PS: i'm using Windows 8.1-32 bit sys. any help 'ud be appreciated.Thanks in advance
0 Comments
Answers (1)
Jan
on 13 May 2015
Using a 32-bit OS is a severe drawback, because this limits the usable memory. So the best idea would be to install a modern 64-bit system and more RAM.
A 300MB text file will not exhaust your machine, if the memory is not occupied by other programs or variables. So close other applications. Clearing all variables is not necessarily a good idea. Please post your code to give us a chance to see, what's going on.
See Also
Categories
Find more on String Parsing 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!