Searching through a large text file in Matlab

Assuming we use Matlab, what is the best way to search for a string in a large text file (can be bigger than 1GB)? Reading the entire file into memory would be costly.

Answers


You need to look into this:Importing Large text data.

The method would be to use blocks. Load Data in blocks.

It can be done by the range input argument in xlsread. In the range itself, you can specify the columns as well..

Syntax:

num = xlsread(filename,sheet,xlRange)

Example:

filename = 'myExample.xlsx';
sheet = 1;
xlRange = 'B2:C3';

subsetA = xlsread(filename, sheet, xlRange)

Need Your Help

Understanding NSRunLoop

ios objective-c cocoa-touch nsrunloop

Can anyone explain for what is NSRunLoop? so as I know NSRunLoop is a something connected with NSThread right? So assume I create a Thread like

Custom servlet/jsp in Liferay portlet

java jsp servlets portlet liferay

I remember it was possible to add something like this to web.xml of a portlet and one could reach the jsp or servlet at http://host:8080/abcd/hw ....

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.