string
conversão para string (cadeia de caracteres)
Seqüência de Chamamento
text = string(x) [out, in, text] = string(SciFun)
Parâmetros
- x
Any Scilab variable type.
- SciFun
a function in Scilab language (handle of type 13, not its name as a string).
Descrição
Converte uma matriz em uma matriz de strings.
Se SciFun
é uma função [out, in, text] = string(x)
retorna três vetores de strings :
out
é o vetor de variáveis de saída,in
é o vetor de variáveis de entrada, etext
é o vetor (coluna) do código fonte da função.
Se x
é uma variável lib
(bibiloteca), text é um vetor coluna de strings. O primeiro elemento
contém o endereço do arquivo biblioteca e o outro o nome da função que ela
define.
![]() | For any complex, real, integer, polynomial or rational input, the format of literal
numbers output from string(..) is managed by the
format function (see examples). |
Note that string([]) returns [] (unchanged).
Exemplos
string(rand(2, 2)) deff("y = mymacro(x)", "y = x + 1") [out, in, text] = string(mymacro) x = 123.356; disp("Result is " + string(x)); disp("/" + string(~%t) + "/"); disp("/" + string(%i+1) + "/"); disp("/" + string(int16(-123)) + "/"); disp("/" + string(1 + %s + %s^3) + "/"); string(corelib) v = format(); disp(string(%pi)) format(24); disp(string(%pi)) format(v(2)) string(1:4:$)
Ver Também
- format — set the default output format of decimal numbers
- sci2exp — returns a string able to generate a given Scilab object
- msprintf — converts, formats, and writes data in a string
- tree2code — gera a definição ASCII de uma função Scilab
- pol2str — conversão de polinômio para string
- execstr — executa código Scilab em strings
- evstr — avaliação de expressões
- strtod — parse and convert literal numbers STRings TO Decimal numbers
- csvTextScan — Converts into a matrix texts representing separated values
Histórico
Versão | Descrição |
5.4.0 | implicitlist typeof input accepted. |
2024.0.0 | list, cell and struct accepted. |
Report an issue | ||
<< strindex | Cadeias de Caracteres (Strings) | stripblanks >> |