Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - Português

Change language to:
English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Ajuda do Scilab >> Cadeias de Caracteres (Strings) > string

string

conversão para string (cadeia de caracteres)

Seqüência de Chamamento

text = string(x)
[out, in, text] = string(SciFun)

Parâmetros

x

matriz de reais ou função

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, e
  • text é 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

VersionDescription
5.4.0 implicitlist typeof input accepted.
Report an issue
<< strindex Cadeias de Caracteres (Strings) strings >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 25 08:52:32 CET 2020