How does "disp" formatting work exactly?
19 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
dsmalenb
el 16 de Mayo de 2019
Comentada: Walter Roberson
el 17 de Mayo de 2019
Greetings,
I am converting some PDFs using Matlab and the way I want the final text to look is exactly how "disp" displays it. However, I am scratching my head of how to capture that in a way that I can write it to a word document or capure that exact process that "disp" does using fprintf. Any ideas?
0 comentarios
Respuesta aceptada
Walter Roberson
el 16 de Mayo de 2019
None of the disp() formats correspond to single fprintf() formats. They all examine the range and data type of what they are displaying and choose output format dynamically. The output it uses for a vector of values might be different than what it uses for the values individually.
You can evalc() to capture the results of disp(), or you might be able to use diary() for your purposes.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!