How to I disable truncation of long strings in structs in command window?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I am on Matlab R2014a (8.3.0.532, glnxa64). Whenever I have a long string as a struct member and let it display on the command window, I get a truncated version of it. How do I disable this "feature"?
Example:
>> myStruct.myFieldname = repmat('A', 1, 100)
myStruct =
myFieldname: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...'
0 commentaires
Réponses (1)
Thomas Koelen
le 9 Avr 2015
Modifié(e) : Thomas Koelen
le 9 Avr 2015
myStruct.myFieldname = repmat('A', 1, 100);
fprintf(myStruct.myFieldname)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
:D
edit:
Just typing
myStruct.myFieldname
also showed me the whole string.
2 commentaires
Thomas Koelen
le 9 Avr 2015
What exactly are you trying to do? Could you explain so I can be of better help!
Voir également
Catégories
En savoir plus sur Data Type Conversion dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!