How to put names of events in a listed vector?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I want to put names in a column vector like this: Event1 Event2 etc
The only way to can do this right now is if I make each event the same size using space bar (or a period because a spacebar wont show up in the question) like this: a=[event1..;event345;event45.;etc....];
As you can see they are all the same size. However, this is a problem because 1) it takes forever and 2) when it comes to plot these names, all the letters of a single name plot in the exact same area, making it unreadable if that makes sense. How do I change this? Thanks.
0 Kommentare
Akzeptierte Antwort
James Tursa
am 3 Jul. 2014
Can you use a cell array of strings instead? E.g., {'event1','event345','event45', etc }. That way the strings do not need to be the same length with blank padding at the end. Also, several MATLAB functions work with cell arrays of strings as inputs.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!