.. index:: single: G7 Reference Manual; M single: G7 Command; madd single: G7 Command; matdata single: G7 Command; matupdate single: G7 Command; matin single: G7 Command; matin5 single: G7 Command; matty single: G7 Command; matprint single: G7 Command; maxobs single: G7 Command; mcopy single: G7 Command; mgraph single: G7 Command; mplot single: G7 Command; minv single: G7 Command; missing single: G7 Command; mmult single: G7 Command; mode single: G7 Command; mup single: G7 Command; monup single: G7 Command; move single: G7 Command; mtrans *G7* Commands: M ================ .. _G7RMmadd: **madd = [bank letter.] + [bank letter.] [period]** The *madd* command performs addition or subtraction of two matrices and stores the results in a third. If the optional date is absent, then the operation is done over the *fdates* range. If no bank letter is specified, the right-hand side matrices are assumed to be in the default Vam file. Example:: fdates 1972 2020 madd A = B + C This example forms A as the sum of B and C, over the period 1972 to 2020, with all matrices in the default Vam file. Example:: fdates 1972 2020 madd A = e.B – e.C This example forms A in the default Vam bank as the difference of B and C from bank 'e', over the period 1972 to 2020. Related Topics: @bmk function, :ref:`linv `, :ref:`mcopy `, :ref:`minv `, :ref:`mmult `, :ref:`mtrans ` | **mainfontname ** | Set the typeface in the main *G7* window. Related Topics: :ref:`xl font ` | **mainfontsize ** | Set the size of the type in the main *G7* window. Related Topics: :ref:`xl font ` | **mainfontcolor ** | Set the font color in the main *G7* window. Related Topics: :ref:`xl font ` | **maincolor ** | Set the background color of the main *G7* window. Related Topics: :ref:`xl font ` | **mainautofontsize <0|1>** | Specify whether to adjust the font size automatically in the main *G7* window. Options may be specified as <0|1>, , , or . | **mainfontbold <0|1>** | Specify the bold setting in the main *G7* window. Options may be specified as <0|1>, , , or . | **mainfontitalic <0|1>** | Specify the italic setting in the main *G7* window. Options may be specified as <0|1>, , , or . | **mainfontunderline <0|1>** | Specify the underline setting in the main *G7* window. Options may be specified as <0|1>, , , or . | **mainfontstrikeout <0|1>** | Specify the strikeout setting in the main *G7* window. Options may be specified as <0|1>, , , or . .. _G7RMmatdata: .. _G7RMmatupdate: | **(matd)ata** | **(matu)pdate** | This command brings data into *G7* in a rectangular format, which easily could be prepared using Excel or OpenOffice. There are three alternative forms in which the series can be arranged. The series can be arranged either in vertical columns with the name of the series at the top of the column, or in horizontal rows with the names appear on the same line of the *matdat* command. Up to 20 columns of numbers occupying up to 160 characters per line may be given. The *matdata* command is used to provide data for a new series. If the series already is present in the databank, it will be overwritten. The *matupdate* command requires that the data already are present in the workspace bank, and it merges the new data with the existing series. The three forms of the command are: Form 1:: matdat gnp c cd cnd cs 1981.1 1513 950 146 359 445 1981.2 1512 949 140 361 448 1981.3 1522 956 143 361 450 ; Dates appear as the first number on each line. Here 1513 is the value of "gnp" in 1981.1, 1522 is the value in 1981.2, etc. Form 2:: matdat 1981.1 gnp c cd cnd cs 1513 950 146 359 445 1512 949 140 361 448 1522 956 143 361 450 ; The date of the first observation appears on the command line, and no dates appear on subsequent lines. Use a semicolon to end the data. (You must have a semi-colon on the last line of data for either form.) Here is yet another version of legal format for *matdata*. Form 3:: matdat gnp out(1-4) 1981.1 1513 1512 1522 950 949 956 359 140 143 359 361 361 445 448 450; Here, series names are given immediately after *matdat* with starting date given as the last argument on the *matdat* line. The first series reads from the first line after the *matdat*, the second series reads from the second line, and so on. Note also that group definitions are allowed in this version. Related Topics: :ref:`data ` .. _G7RMmatin: | **matin []** | **[form]** | The *matin* command reads matrix data for one year and stores it in a Vam file. For it to work, a Vam file already must be assigned and set as the default Vam file. Then a rectangular array must follow with numbers matching the , , , and parameters of the command. As in the *vmatdata* command, the optional parameter is the number of spaces to be skipped in reading each line. The parameter and the
line work together exactly as for *vmatdata*: the absence of a parameter indicates the presence of a form line. A '#' in the first space of a line means to skip the whole line. Use of *matin* does not affect entries outside the specified area, so it can be used to update a matrix as well as to introduce it originally. Example:: matin govstr 1987 1 25 1 5 4 1 48 0 0 0 61 2 495 0 32 0 453 3 0 0 5 0 0 4 1344 0 0 0 1651 5 812 0 201 0 0 6 859 555 0 0 3012 ... The above example actually is used to introduce the distribution of government structures by 25 categories to 5 government types in *IdLift*. The data presented is for 1987, and covers rows 1 to 25 and columns 1 to 5 of the matrix. Four columns are to be skipped at the beginning of each line, and this is where we keep the row number, which serves to make the file easier to read. Related Topics: :ref:`matin5 `, :ref:`pmatin `, :ref:`pmatin1 ` :ref:`vmatdata ` .. _G7RMmatin5: **matin5 [ ]** The *matin5* command is another command for reading data for a matrix. These data are in a format called "punch5." This is an input format for matrices that is useful when a significant number of the matrix elements may be zero. On each line, there are 5 cells (hence the name), and for each cell, the row, column and value are specified. For this command to work, a Vam file must be assigned and set as the default Vam file. In the above syntax, is the name of the matrix as shown in VAM.CFG, is the year of the data, , and are optional arguments that specify the width of the data field for each cell, the number of decimal points, and the width of the field for the row and column indexes. The end of the matrix data is signaled either by a ';' in the first space on a line or by the end of the file. Here is a sample from the beginning of an A-matrix:: matin5 am 1977 9 5 3 # A-matrix for 1977. 83 rows and 83 columns. AM 1 1 0.245790 1 4 0.000220 1 8 0.000410 1 9 0.281300 1 10 0.058360 AM 1 11 0.002070 1 12 0.005680 1 13 0.000380 1 15 0.001700 1 16 0.003060 AM 1 22 0.089770 1 24 0.000070 1 48 0.001210 1 49 0.000130 1 50 0.000030 Related Topics: :ref:`matin `, :ref:`pmatin `, :ref:`pmatin1 `, :ref:`punch `, :ref:`punch5 `, .. _G7RMmatty: | **matty | matpr [file ] [