Display a text document in MATLAB

I am currently working on a project on myopia, where subjects will have to read text on the screen and the machine will track eye movements. In fact, I need my MATLAB program to start the experiment, display the text (I will use books from Project Gutenberg) and, in the end, finish it.

Someone else worked on this in front of me, and their solution was to convert these books to .txt files, check their MATLAB, and let the experimenter manually specify how many words should be on one line. Therefore, instead of automatically formatting the text and in relation to any screen, we must repeatedly enter numbers and get an uneven block of text.

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

My apologies if this has already been asked!

+3
source share
1 answer

You might want to explore MATLAB file sharing. It looks like there are several PDF readers that take a pdf file and output an array of cells. Example: http://www.mathworks.com/matlabcentral/fileexchange/17839-pdf-reader

Then you can parse any line that you want to display on the screen. Not quite sure what your options are for displaying text though .. Good luck!

+1
source

Source: https://habr.com/ru/post/1792682/


All Articles