- Aide Scilab
- Scilab
- Mots clés Scilab
- TMPDIR
- abort
- argn
- banner
- boolean
- break
- clear
- clearglobal
- comp
- debug
- errcatch
- errclear
- error
- exists
- exit
- external
- extraction
- getos
- getshell
- gstacksize
- ieee
- insertion
- inv_coeff
- iserror
- isglobal
- macr2tree
- matrices
- matrix
- mode
- mtlb_mode
- names
- null
- pause
- perl
- poly
- predef
- quit
- rational
- resume
- sciargs
- scilab
- stacksize
- startup
- symbols
- testmatrix
- type
- typename
- user
- varn
- what
- where
- whereami
- who
- whos
- with_atlas
- with_javasci
- with_macros_source
- with_pvm
- add_demo
- clearfun
- continue
- delbpt
- dispbpt
- edit
- error_table
- format
- funcprot
- funptr
- getdebuginfo
- getmd5
- getmemory
- getmodules
- getscilabmode
- getvariablesonstack
- getversion
- intppty
- lasterror
- macr2lst
- newfun
- readgateway
- setbpt
- ver
- warning
- who_user
- with_module
- with_texmacs
- with_tk
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
format
number printing and display format
Calling Sequence
format([type],[long]) v = format() format(m)
Arguments
- type
character string
- long
integer ( max number of digits (default 10))
- v
a vector for the current format v(1) type format : 0 for 'e' and 1 for 'v' v(2) number of digits
- m
a vector to set new format
m(1) number of digits
m(2) type format : 0 for 'e' and 1 for 'v'
Description
Sets the current printing format with the parameter
type
; it is one of the following :
- "v"
for a variable format (default)
- "e"
for the e-format.
long
defines the max number of digits (default
10). format()
returns a vector for the current format:
first component is the type of format (1 if v
; 0 if
e
); second component is the number of digits.
In the old Scilab versions, in "variable format" mode, vectors entries which are less than %eps times the maximum absolute value of the entries were displayed as "0". It is no more the case, the clean function can be used to set neglitible entries to zeros.
Examples
x=rand(1,5); format('v',10);x format(20);x format('e',10);x format(20);x x=[100 %eps]; format('e',10);x format('v',10);x format("v")
See Also
<< error_table | Scilab | funcprot >> |