[Scilab-users] Number to string with padding of leading blanks by a set of characters
Jens Simon Strom
j.s.strom at hslmg.de
Sun Aug 28 20:43:59 CEST 2016
Am 28.08.2016 16:32, schrieb Samuel Gougeon:
> Le 28/08/2016 16:17, Jens Simon Strom a écrit :
>> Hello,
>> I try to transform the number colum N containing integer elements
>> from 1 to 999, e. g.
>>
>> N=[1;11;111]
>>
>> into
>>
>> T=[" 1";" 11";"111"].
>>
>> I tried with commands like justify, repmat, string, size, length -
>> but without success. Do I miss one or more better adequate command(s)?
> Like this? :
> --> strsubst(justify(string(N),"r")," "," ")
> ans =
>
> ! 1 !
> ! !
> ! 11 !
> ! !
> !111 !
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
Bonsoir Samuel,
This is exactly what I need. Solved!
Thanks a lot
Jens
More information about the users
mailing list