format column with compose
Mostrar comentarios más antiguos
here i format row :
formatSpec = "%d - %s";
RowName=compose(formatSpec,t2,sis);

but if i want to format columns? how can i do?

6 comentarios
Dyuman Joshi
el 5 de Nov. de 2023
Remove the prefix serial numbers and tranpose the output.
piero
el 5 de Nov. de 2023
Dyuman Joshi
el 5 de Nov. de 2023
The 1 -, 2 - , 3 - , ... you have at the start of the strings, which is not there in the 2nd image.
piero
el 5 de Nov. de 2023
dpb
el 5 de Nov. de 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...
Respuestas (0)
Categorías
Más información sobre System Composer en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!