How can I display my data on command window instead in .txt file?

I had searched the internet about OCR, I found a code but it shows its output in a '.txt' file thus opening a notepad. I want to display the output on the command window instead, so that I can convert it to string for another input. is there anyway to do it ?

1 Comment

I found a way to display it on command window with the code below. now I want to save its contents in a variable
type('myfile.txt')

Sign in to comment.

 Accepted Answer

More Answers (1)

If you want to convert that code from writing to the file and instead write it to the command window, you can remove the fopen() and fclose() statements and remove the filehandle from fprintf():
fprintf(fileID, '........
becomes
fprintf('.......

Categories

Find more on Convert Image Type 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!