Why did I get different print format in the output txt file?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Benson Gou
il 13 Lug 2020
Commentato: Walter Roberson
il 2 Ago 2020
Dear All,
I used Matlab compiler to generate a standalone application exe file. I then tested it in 3 different computers. I obtained good printing format in the result txt file using my iMac and new Dell (2019), but obtained bad printing format in the result txt file using my old Dell (2015). I copied parts of the results from different computers and compare them as follows:
I. iMac and new Dell
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/331217/image.jpeg)
II. Old Dell
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/331220/image.jpeg)
I am wondering why the alignment of columns when using my old Dell are Not as good as those when used my iMac and new dell. How can I fix this problem?
Thanks.
Benson
Risposta accettata
Stephen23
il 13 Lug 2020
Modificato: Stephen23
il 13 Lug 2020
"I am wondering why the alignment of columns when using my old Dell are Not as good as those when used my iMac and new dell."
This has absolutely nothing to do with MATLAB.
It is because you are not using a fixed-width (aka monospaced) typeface in that text editor.
"How can I fix this problem?"
Change the text editor to use a fixed-width font, e.g. Consolas or Courier or PT Mono (which is what your first screenshot appears to show, whereas the second screenshot appears to show Arial, which is a variable-width typeface).
In MS Notepad change the font via menus Format -> Font... and then select the font.
9 Commenti
Walter Roberson
il 2 Ago 2020
An increasing number of "binary" file formats turn out to be compressed text file formats -- combining the smaller size of binary with the flexibility of processing the text.
However, there are some contexts such as CDF and HDF5 file formats that are structured binary files that are not text. Some of those standardized binary file formats have advantages in being more consistent in making the metadata more explicit -- for example being much more clear as to how the files represent time.
MATLAB -v7.3 files are HDF5 files underneath, but the structure of HDF5 files is not an especially good match for structured compound data types like MATLAB uses, so -v7.3 .mat files can be much larger and slower than the proprietary -v7 format.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Text Files 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!