mozi
mozi

Reputation: 33

Displaying a text document in MATLAB

I'm currently working on a project about myopia, where subjects will have to read text on a screen and a machine will track their eye movements. Essentially, I need my MATLAB program to start the experiment, display the text (I'll be using books from Project Gutenberg), and eventually terminate.

Someone else was working on this before me, and their solution was to convert these ebooks into .txt files, have MATLAB scan them, and have the experimenter manually put in how many words should be on one line. So instead of having the text formatted automatically, and relative to whatever screen is being used, we have to repeatedly type in numbers, and get an uneven block of text.

I don't have too much experience with MATLAB, but I'm assuming there is a better solution. Is it possible to upload some file (.pdf, .epub, whatever) and simply display that on the screen?

My apologies if this has already been asked!

Upvotes: 3

Views: 463

Answers (1)

O_O
O_O

Reputation: 4477

You might want to look into the MATLAB file exchange. It looks like there are several PDF readers which takes a pdf file and outputs a cell array. Ex: http://www.mathworks.com/matlabcentral/fileexchange/17839-pdf-reader

Then you can parse into whatever line you want to display onto your screen. Not exactly sure what your parameters are for displaying the text though.. Good luck!

Upvotes: 1

Related Questions