Trailing-Edge
-
PDP-10 Archives
-
decuslib20-01
-
decus/20-0020/mattea.dem
There are 2 other files named mattea.dem in the archive. Click here to see a list.
100' NAME--MATTEACH
110'
120' DESCRIPTION--TEACH PROGRAM ON USE OF MATRICES
130'
140' SOURCE--UNKNOWN
150'
160' INSTRUCTIONS--TYPE "LIST" AND FOLLOW INSTRUCTIONS.
170'
180'
190' * * * * * * MAIN PROGRAM * * * * * * * * * * * *
200'
210 THE FOLLOWING PROGRAM ASSUMES THE READER IS FAMILIAR WITH THE
220 FIRST SECTION OF THE BASIC MANUAL, THE USE OF SUBSCRIPTED VARIABLES
230 AND THE USE OF THE DIM STATEMENT.
240
250 THE FIRST EXERCISE TO HELP YOU LEARN ABOUT MATRICES IS TO TYPE A
260 PROGRAM TO READ IN A FIVE ELEMENT ROW VECTOR FROM A *DATA* STATEMENT
270 AND GET THE MACHINE TO PRINT IT OUT IN REVERSE ORDER.
280
290 YOU SHOULD NOT USE *MAT* STATEMENTS; JUST USE TWO *FOR NEXT* PAIRS
300 TO READ THE DATA IN AND THEN PRINT THE NUMBERS OUT AGAIN.
310 THE PROGRAM SHOULD LOOK SOMETHING LIKE THIS:
320 10 DIM A(25)
330 20 FOR I=1 TO 5
340 30 READ A(I)
350 40 NEXT I
360 50 FOR I = 5 TO 1 STEP -1
370 60 PRINT A(I) ;
380 70 NEXT I
390 80 DATA 13,14,15,16,17
400 90 END
410
420
430 NAME THIS PROGRAM MATRXONE
440
450 TYPE TEST WHEN YOU THINK IT WORKS.
460
470 END