format column with compose
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
here i format row :
formatSpec = "%d - %s";
RowName=compose(formatSpec,t2,sis);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1530347/image.png)
but if i want to format columns? how can i do?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1530352/image.png)
6 commentaires
dpb
le 5 Nov 2023
@piero is presuming (as best info we have since you didn't provide testing dataset) the "1 - " prefix in your first image is real.
If so, then
RowName=extractAfter(compose(formatSpec,t2,sis),"- ").';
should be the magic incantation you're looking for.
If not, attach a (small) example dataset for folks to play with...
Réponses (0)
Voir également
Catégories
En savoir plus sur Convert Image Type dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!