File: write.cat

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (50 lines) | stat: -rw-r--r-- 1,602 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

write(1)                       Scilab Function                       write(1)
NAME
  write -  write in a formatted file

DESCRIPTION
  write(file-desc,a,[format])
  write(file-desc,a,k,format)

PARAMETERS

  file-desc : character string specifying the file name or integer value
            specifying logical unit (see file).

  a         : real matrix or column vector of character strings.

  format    : character string, specifies a "Fortran" format. This character
            string must begin with a right parenthesis and end with a left
            parenthesis. Formats cannot mix floating point , integer or char-
            acter edition modes

  k         : integer vector

DESCRIPTION
  writes row-by-row a real matrix or a column vector of character strings in
  a formatted file.  Each row of the a argument begin in a new line of file-
  desc file. Depending on format a given row of the a argument may be written
  in more than one line of file-desc file.

  Format examples : (1x,e10.3,5x,3(f3.0))  ,  (10x,a20) ;

  See a Fortran book for more precision.

  Direct access files : x=write(file_desc,a,k,format).  Here k is the vector
  of records (one record by row, i.e. m=prod(size(k))

  write(%io(2),....) writes on Scilab's window.

EXAMPLE
  unix('rm -f asave')
  A=rand(5,3); write('asave',A); A=read('asave',5,3);
  write(%io(2),A,'('' | '',3(f10.3,'' | ''))')
  write(%io(2),string(1:10))
  write(%io(2),strcat(string(1:10),','))
  write(%io(2),1:10,'(10(i2,3x))')

  unix('rm -f foo')
  write('foo',A)
SEE ALSO
  file, writb, read, print, string, fprintf, printf, sprintf