format column with compose

2 次查看(过去 30 天)
piero
piero 2023-11-5
编辑: piero 2023-11-5
here i format row :
formatSpec = "%d - %s";
RowName=compose(formatSpec,t2,sis);
but if i want to format columns? how can i do?
  6 个评论
dpb
dpb 2023-11-5
@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...
piero
piero 2023-11-5
编辑:piero 2023-11-5
"should be the magic incantation you're looking for" :DD
RowColumn=RowName'; ==> this solution is ok! thank

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by