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

12 visualizzazioni (ultimi 30 giorni)
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 Commento
Krizzel Mae Anor
Krizzel Mae Anor il 11 Nov 2017
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')

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 11 Nov 2017
Modificato: Walter Roberson il 11 Nov 2017
Probably yes, there is likely a way to do it.

Più risposte (1)

Image Analyst
Image Analyst il 11 Nov 2017
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('.......

Categorie

Scopri di più su Data Type Conversion in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by