Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Eviews5 / EViews5 / Docs / EViews 5 Command Ref.pdf
Скачиваний:
91
Добавлен:
23.03.2015
Размер:
5.23 Mб
Скачать

Vector—193

scalar coef1=empvar.b(1,2)

Vector

Vector. (One dimensional array of numbers).

Vector Declaration

vector

...................declare vector object (p. 527).

There are several ways to create a vector object. Enter the vector keyword (with an optional dimension) followed by a name:

vector scalarmat

vector(10) results

Alternatively, you may declare a vector using an assignment statement. The vector will be sized and initialized, accordingly:

vector(10) myvec=3.14159 vector results=vec1

Vector Views

area ......................

area graph of the vector (p. 211).

bar .......................

bar graph of data against the row index (p. 219).

label .....................

label information for the vector object (p. 330).

line.......................

line graph of the data against the row index (p. 334).

sheet ....................

spreadsheet view of the vector (p. 469).

spike ....................

spike graph (p. 479).

stats......................

descriptive statistics (p. 487).

Vector Procs

displayname .........

set display name (p. 276).

fill ........................

fill elements of the vector (p. 293).

read......................

import data from disk (p. 414).

setformat ..............

set the display format for the vector spreadsheet (p. 456).

setindent...............

set the indentation for the vector spreadsheet (p. 462).

setjust...................

set the justification for the vector spreadsheet (p. 463).

setwidth ...............

set the column width for the vector spreadsheet (p. 468).

write ....................

export data to disk (p. 545).

194—Appendix A. Object, View and Procedure Reference

Vector Data Members

(i)........................

i-th element of the vector. Simply append “(i)” to the matrix name

 

(without a “.”).

Vector Examples

To declare a vector and to fill it with data read in from an Excel file:

vector(10) mydata

mydata.read(b2) thedata.xls

To access a single element of the vector using direct indexing:

scalar result1=mydata(2)

The vector may be used in standard matrix expressions:

rowvector transdata=@transpose(mydata)

scalar inner=@transpose(mydata)*mydata

Соседние файлы в папке Docs