home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / text / hints / volume_02 / issue_09 < prev    next >
Text File  |  1995-02-16  |  15KB  |  713 lines

  1. Å   External drive hang-ups Ö  If you have an external 5.25ö drive
  2. configured and it is not kept on-line (i.e. it is switched off) then the
  3. machine hangs up if the ADFS is searching for a named disc which is not
  4. in drive 0 at the time that the command was issued, e.g. when attempting
  5. to copy file(s) from one 3.5ò disc to another. The solution appears to
  6. be either always have the external drive switched on, or to configure it
  7. out of the system during periods when it is switched off.
  8. Å   GWBASIC to BBC BASIC Ö I wanted to convert a GWBASIC program to a
  9. BBC BASIC one, but both BASICæs store programs with the keywords
  10. tokenised. Therefore I needed the equivalent of the *SPOOL command. The
  11. answer seems to be that from GWBASIC either:
  12. SAVE öfilenameò,A
  13. or
  14. LIST ,öfilenameò
  15. Both give a version of the listing which, when ported across via
  16. putfile, can be *EXEC-uted.
  17. Å   Mouse problems Ö I had a problem with my mouse. Sometimes when I
  18. moved the mouse down, the pointer moved UP. At other times it worked
  19. perfectly. I tried everything Ö including measuring the electronics
  20. inside the mouse, and inside the keyboard, adjusting the sensitivity and
  21. cleaning the inside and outside of the mouse. Finally I discovered that
  22. the problem was a broken wire in the cable out from the mouse. Odd
  23. Bakken
  24. 2.9
  25. Å   NEC multisync modifications Ö With a NEC multisync II monitor, I
  26. found that the horizontal width of the picture was not optimal. There
  27. was a black border on each side of the picture and, in modes 18-20, the
  28. picture was even smaller, making the letters a little hard to read. I
  29. called the local dealer and got a copy of their service manual. You can
  30. adjust the horizontal size with coil L505. I got some improvement by
  31. removing the core of the coil but not enough. So I shorted the coil
  32. completely (after consulting the dealer, who said it would not harm the
  33. monitor). By doing this I got a 10% wider picture. (I still have the
  34. distortion of the top lines in mode 18-20.) Odd Bakken
  35. 2.9
  36. Å   OS_PrettyPrint Ö There has been very little in the literature about
  37. the use of OS_PrettyPrint to avoid word wraparound in, for example, the
  38. preparation of instruction notes at the beginning of a program. (You can
  39. use SYS &44 instead of writing the full command). All that is needed is
  40. a simple BASIC program such as :
  41. 2.9
  42.    10 SYS &44,ö<Block of words>ò
  43. 2.9
  44.    20 PRINT;ö ò;:REM Insert space
  45. 2.9
  46. or    20 PRINT:REM New Line
  47. 2.9
  48.    30 SYS &44,ö<Continuation of
  49. 2.9
  50.  text>ö
  51. 2.9
  52.    40 PRINT;ö ò;       etc.
  53. 2.9
  54. The text in line 30 continues from the point where it ended in line 10.
  55. Unfortunately the OS command strips the leading and trailing spaces from
  56. the block of text. The PRINT statements are therefore necess-ary to
  57. separate the end of the text in line 10 from the beginning of the text
  58. in line 30 or to force a new line. The word block length has the
  59. standard BASIC line limitation which amounts to roughly three lines of
  60. text in the 80 chars/line modes. The command works in any mode and by
  61. judicious placing of PRINT and COLOUR statements you can have sections
  62. of the text or even single words in colour.
  63. 2.9
  64. Å   Pipedream and the LC10 Ö To print in colour on a Star LC 10 colour
  65. printer, if Pipedream is config-ured with a printer driver which
  66. includes the follow-ing codes, the various printing styles available on
  67. the Star LC 10 C can be selected when the printer is switched on, and
  68. printed in colour.
  69. 2.9
  70.       On   Off   Description
  71. 2.9
  72.    H1   27 114 1   27 114 0   Red Text
  73. 2.9
  74.    H2   27 114 2    27 114 0   Blue Text
  75. 2.9
  76.    H3   27 114 3   27 114 0    Violet Text
  77. 2.9
  78.    H4   27 114 4   27 114 0   Yellow Text
  79. 2.9
  80.    H5   27 114 5    27 114 0   Orange Text
  81. 2.9
  82.    H6   27 114 6   27 114 0   Green Text
  83. 2.9
  84. Å   Pipedream line spacing Ö (Colton Softwareæs reply to a request for
  85. 1.5 line spacing on Pipedream) Pipedream knows only integral line
  86. spacing; single, double etc, but the line spacing on the printer can be
  87. set independently by sending out some codes with the printer-on string
  88. (PON). For example, PON       ESC ö2ò would give 1.5 line spacing on
  89. Epson compatible printers.
  90. 2.9
  91. Å   Multi Sync Owners! Out here in New Zealand, the average multisync
  92. monitor costs about ú60 more than the standard Acorn monitor. As a
  93. result around 60-80% of Archimedes owners have multisyncæs. I havenæt a
  94. clue as to why they are so much dearer in the U.K. but suggest that
  95. someone somewhere is making a great deal of money! Most of the programs
  96. available donæt provide a multisync option which is a real shame as that
  97. extra 256 pixels make all the difference. Iæve tried to convert some
  98. programs but havenæt had much luck except for Render Bender.
  99. 2.9
  100. To convert Render Bender proceed as follows:
  101. 2.9
  102. Make a new backup of your Render Bender System Disc. Label it öRender
  103. Bender Modes 15 & 21ò or somesuch. Enter BASIC and load the main program
  104. ö!RENDER.RENDERò. Change or add the following lines.
  105. 2.9
  106.    60 DIM loadadd &F100,sb1%32*1023
  107. 2.9
  108. :org=loadadd+&A100
  109. 2.9
  110.  2550 XRES=640:YRES=256:SC%=100:
  111. 2.9
  112.  DES=1000:IND=1.5:SKYCOL=13
  113. 2.9
  114. :SKYDEP=600:AVE=1:SHAD=1:SHGR=0
  115. 2.9
  116.  2950 IF YRES=256 AND SCRADD%<=
  117. 2.9
  118. &1FB0000 YRES=512:PROCbox
  119. 2.9
  120. (17,16,14,2,öHIGH*RESOLUTIONò
  121. 2.9
  122. ,14,0):ENDPROC
  123. 2.9
  124.  2960 YRES=256:PROCbox(17,16,14,2,
  125. 2.9
  126. öLOW*RESOLUTIONò,14,0):ENDPROC
  127. 2.9
  128.  3981 IF RES=320 THEN XRES=640:
  129. 2.9
  130. YRES=256
  131. 2.9
  132. 13590 vars!xlim=XL:vars!ylim=YL
  133. 2.9
  134. :vars!reso=XRES
  135. 2.9
  136. 14010 A$=LEFT$(name$,8):A$=A$+
  137. 2.9
  138. STR$FILFR%:IF YRES=256 ENS%
  139. 2.9
  140. =&28000 ELSE ENS%=&50000
  141. 2.9
  142. 14090 XL=XRES/SIZE%:YL=YRES/SIZE%
  143. 2.9
  144. :PROCcoeffin
  145. 2.9
  146. 14110 IF YRES=256 MODE15 ELSE MODE21
  147. 2.9
  148. 14190 IF YRES=256 MODE15 ELSE MODE21
  149. 2.9
  150. 14280 XL=XRES/SIZE%:YL=YRES/SIZE%
  151. 2.9
  152. :PROCcoeffin:SCROFF%=1
  153. 2.9
  154. :PROCisflooron
  155. 2.9
  156. 14290 IF YRES=256 MODE15 ELSE MODE21
  157. 2.9
  158. 15150 IF YRES=256 PROCbox(17,16,14,2,
  159. 2.9
  160. öLOW*RESOLUTIONò,14,1)ELSE PROCbox
  161. 2.9
  162. (17,16,14,2,öHIGH*RESOLUTIONò,14,1)
  163. 2.9
  164. 11320 GCOL63 TINT 255:VDU5:IF
  165. 2.9
  166.  YRES=256 PRINTTAB(0,31);öClick
  167. 2.9
  168.  Mouseö ELSE PRINTTAB(0,62);
  169. 2.9
  170. öClick Mouseò
  171. 2.9
  172. 14380 GCOL63 TINT255:IFYRES=256
  173. 2.9
  174.  PRINTTAB(0,31);öTime taken ò;
  175. 2.9
  176. :PROCtime(TI) :GCOL 25:PRINT;
  177. 2.9
  178. ö Click mouseò ELSE PRINTTAB(0,62);öTime taken ò; :PROCtime(TI):GCOL 25:
  179. 2.9
  180. PRINT;ö Click mouseò
  181. 2.9
  182. SAVE ö:0.$.!RE*.RENDERò
  183. 2.9
  184. Then to modify the Picture Compressor
  185. 2.9
  186. $.!RE*.UTIL*.PICCOMP
  187. 2.9
  188. *BASIC
  189. 2.9
  190. *LOAD :0.$.!RE*.UTIL*.PICCOMP 8F00
  191. 2.9
  192. *ACCESS :0.$.!RE*.UTIL*.PICCOMP WR
  193. 2.9
  194. !&90C0=&E3520015
  195. 2.9
  196. !&90C4=&03A0B805
  197. 2.9
  198. !&92F0=&E3500015
  199. 2.9
  200. !&92F4=&03A08805
  201. 2.9
  202. *SAVE :0.$.!RE*.UTIL*.PICCOMP 8F00+534
  203. 2.9
  204. *SETTYPE :0.$.!RE*.UTIL*.PICCOMP &FFA
  205. 2.9
  206. To modify the Animator
  207. 2.9
  208. *BASIC
  209. 2.9
  210. LOADö:0.$.!RE*.UTIL*.ANIROUTò
  211. 2.9
  212. 140DIM buff &50000,DUM 1:anipo%=DUM
  213. 2.9
  214. +&6000:PROCboot:!anipo%=0
  215. 2.9
  216. 1371IF !mode=21 length%=&50000
  217. 2.9
  218. 2251IF MODE=21 length%=&50000
  219. 2.9
  220. SAVE ö:0.$.!RE*.UTIL*.ANIROUTò
  221. 2.9
  222. Finally to get Render Bender going you need a new startup file
  223. 2.9
  224. *BUILD :0.$.Rend21
  225. 2.9
  226. *ECHO <22> <21>
  227. 2.9
  228. *SET RENDER :0.$.!RENDER
  229. 2.9
  230. *set OBEY$DIR adfs::0.$.!RENDER
  231. 2.9
  232. *set FROM$DESK 0
  233. 2.9
  234. *SET RendHard1 adfs::4.$.GRAPHICS.
  235. 2.9
  236. !Render \ or your path here
  237. 2.9
  238. *SET HardRoot $
  239. 2.9
  240. *RMLOAD <RENDER>.Utilities.FSLOAD
  241. 2.9
  242. *RMLOAD <RENDER>.Utilities.PicComp
  243. 2.9
  244. *BASIC <RENDER>.START
  245. 2.9
  246. <Escape>
  247. 2.9
  248. *SETTYPE :0.$.Rend21 &FFE
  249. 2.9
  250. Then to run Render Bender using:
  251. 2.9
  252. *CO. SCR. 320K
  253. 2.9
  254. <ctrl-break>
  255. 2.9
  256. *:0.$.Rend21
  257. 2.9
  258. All this is supplied on the monthly program disc as a series of exec
  259. files so to modify Render Bender you just do this (where <comment>=just
  260. that!)
  261. 2.9
  262. <insert Render Bender Disc>
  263. 2.9
  264. LOADö:0.!RENDER.RENDERò
  265. 2.9
  266. <insert program disc and *MOUNT or
  267. 2.9
  268.  use winnie>
  269. 2.9
  270. *EXEC Rendermods.RendMods
  271. 2.9
  272. <insert Render disc and *MOUNT>
  273. 2.9
  274. SAVE ö:0.$.!RENDER.RENDERò
  275. 2.9
  276. LOAD ö:0.!RENDER.UTIL*.ANIROUTò
  277. 2.9
  278. <insert my disc and *MOUNT or use
  279. 2.9
  280.  winnie>
  281. 2.9
  282. *EXEC Rendermods.AniMods
  283. 2.9
  284. <insert Render disc and *MOUNT>
  285. 2.9
  286. SAVE ö:0.!RENDER.UTIL*.ANIROUTò
  287. 2.9
  288. COPY Rend21 across to $ <On Render
  289. 2.9
  290.  Disc!>
  291. 2.9
  292. *WIPE $.!RE*.U*.PICCOMP F~C <get rid
  293. 2.9
  294.  of old PicComp>
  295. 2.9
  296. COPY PicComp across to $.!RENDER.
  297. 2.9
  298. UTILITIES <On Render Disc!>
  299. 2.9
  300. then you should be ready to go!
  301. 2.9
  302. Å   Eigenvalues of a matrix Ö The following program is meant for readers
  303. who are interested in the determination of eigenvalues of a matrix. It
  304. is based on the idea that the eigenvalues of a matrix do not change by a
  305. similarity transformation. Decomposing a square, symmetric matrix S in
  306. its lower and upper triangular forms (L and U respectively satisfying
  307. LU=S) gives a new matrix UL having the same eigenvalues as S, since UL =
  308. (U^Ö1)ULU. It can be proved that by repeating this process, a matrix is
  309. obtained containing zero elements, except for the eigenvalues residing
  310. on the main diagonal.
  311. 2.9
  312. Consider an arbitrary matrix M, having a number of rows equal to or
  313. greater than its number of columns. Then MæM (MÉ standing for transposed
  314. of M) is a square, symmetric matrix having the same eigen-values as M.
  315. Some of these values may equal zero indicating that the dimensionality
  316. of M is smaller than its number of columns. Or in other words, the
  317. matrix spans an x-dimensional space, where x equals the number of non-
  318. zero eigenvalues of M.
  319. 2.9
  320.   10 REM >Eig_values
  321. 2.9
  322.   20 :
  323. 2.9
  324.   30 ********************************
  325. 2.9
  326.   40 REM Eigenvalues of an arbitrary
  327. 2.9
  328.   50 REM matrix.  E.D. Engelhardt,
  329. 2.9
  330.  March 1989
  331. 2.9
  332.   60 ********************************
  333. 2.9
  334.   70 :
  335. 2.9
  336.   80 PROCinit
  337. 2.9
  338.   90 :
  339. 2.9
  340.  100 PROCmenu
  341. 2.9
  342.  110 :
  343. 2.9
  344.  120 PROCinput
  345. 2.9
  346.  130 :
  347. 2.9
  348.  140 start%=TIME
  349. 2.9
  350.  150 PROCmain
  351. 2.9
  352.  160 end%=TIME
  353. 2.9
  354.  170 :
  355. 2.9
  356.  180 PROCprint
  357. 2.9
  358.  190 END
  359. 2.9
  360.  200 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  361. 2.9
  362.  210 DEFPROCinit
  363. 2.9
  364.  220 @%=&0A0A:CLS
  365. 2.9
  366.  230 ENDPROC
  367. 2.9
  368.  240 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  369. 2.9
  370.  250 DEFPROCmenu
  371. 2.9
  372.  260 OFF
  373. 2.9
  374.  270 PRINTTAB(31,12)öEIGENVALUESòÉ
  375. 2.9
  376.  280 PRINTTAB(27,14)ö[1] Random matrixò
  377. 2.9
  378.  290 PRINTTAB(27,15)ö[2] Fixed demo
  379. 2.9
  380.  5x4 matrixö
  381. 2.9
  382.  300 PRINTTAB(27,16)ö[3] Fixed demo
  383. 2.9
  384.  4x4 matrixö
  385. 2.9
  386.  310 ENDPROC
  387. 2.9
  388.  320 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  389. 2.9
  390.  330 DEFPROCinput
  391. 2.9
  392.  340 while=TRUE
  393. 2.9
  394.  350 WHILE while
  395. 2.9
  396.  360   CASE GET$ OF
  397. 2.9
  398.  370   WHEN ö1ò:while=FALSE:ON
  399. 2.9
  400.  380     REM Generate random matrix M,
  401. 2.9
  402.  col% columns and row% rows
  403. 2.9
  404.  390     REPEAT:
  405. 2.9
  406. INPUTÉö Rows            : ò
  407. 2.9
  408. row%:UNTIL row%>0
  409. 2.9
  410.  400     REPEAT:INPUTÉö Columns
  411. 2.9
  412. <= rows : öcol%:UNTIL col%
  413. 2.9
  414. <=row% AND col%>0
  415. 2.9
  416.  410     CLS:
  417. 2.9
  418. PRINTÉö Rows       : òSTR$
  419. 2.9
  420. row%Éö Columns    : òSTR$col%
  421. 2.9
  422.  420     row%-=1:col%-=1
  423. 2.9
  424.  430     DIM M(row%,col%)
  425. 2.9
  426.  440     FORr%=0TOrow%:FORc%=0TOcol%
  427. 2.9
  428.  450       M(r%,c%)=RND(1)*SGN(0.5-
  429. 2.9
  430. RND(1))
  431. 2.9
  432.  460     NEXT:NEXT
  433. 2.9
  434.  470     :
  435. 2.9
  436.  480   WHEN ö2ò:while=FALSE:ON
  437. 2.9
  438.  490     REM *** Fixed data for demo
  439. 2.9
  440.  5x4 matrix having one zero
  441. 2.9
  442.  eigenvalue
  443. 2.9
  444.  500     CLS:PRINTÉö Rows       : 5ò
  445. 2.9
  446. Éö Columns    : 4ò
  447. 2.9
  448.  510     row%=4:col%=3:DIM M(4,3)
  449. 2.9
  450.  520     M(0,0)=4:M(0,1)=3:M(0,2)=2:
  451. 2.9
  452. M(0,3)=1
  453. 2.9
  454.  530     M(1,0)=2:M(1,1)=4:M(1,2)=1:
  455. 2.9
  456. M(1,3)=3
  457. 2.9
  458.  540     M(2,0)=6:M(2,1)=7:M(2,2)=3:
  459. 2.9
  460. M(2,3)=4
  461. 2.9
  462.  550     M(3,0)=8:M(3,1)=11:M(3,2)=4:
  463. 2.9
  464. M(3,3)=7
  465. 2.9
  466.  560     M(4,0)=8:M(4,1)=6:M(4,2)=4:
  467. 2.9
  468. M(4,3)=7
  469. 2.9
  470.  570     :
  471. 2.9
  472.  580   WHEN ö3ò:while=FALSE:ON
  473. 2.9
  474.  590     REM Fixed data for demo 4x4
  475. 2.9
  476. matrix having four eigenvalues
  477. 2.9
  478.  600     CLS:PRINTÉö Rows       : 4ò
  479. 2.9
  480. Éö Columns    : 4ò
  481. 2.9
  482.  610     row%=3:col%=3:DIM M(3,3)
  483. 2.9
  484.  620     M(0,0)=1.00:M(0,1)=0.42:
  485. 2.9
  486. M(0,2)=0.54:M(0,3)=0.66
  487. 2.9
  488.  630     M(1,0)=0.42:M(1,1)=1.00:
  489. 2.9
  490. M(1,2)=0.32:M(1,3)=0.44
  491. 2.9
  492.  640     M(2,0)=0.54:M(2,1)=0.32:
  493. 2.9
  494. M(2,2)=1.00:M(2,3)=0.22
  495. 2.9
  496.  650     M(3,0)=0.66:M(3,1)=0.44:
  497. 2.9
  498. M(3,2)=0.22:M(3,3)=1.00
  499. 2.9
  500.  660   ENDCASE
  501. 2.9
  502.  670 ENDWHILE
  503. 2.9
  504.  680 ENDPROC
  505. 2.9
  506.  690 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-
  507. 2.9
  508.  700 DEFPROCmain
  509. 2.9
  510.  710 DIM Mt(col%,row%),MtM(col%,col%)
  511. 2.9
  512. ,E(col%)
  513. 2.9
  514.  720 PROCtranspose(M(),Mt())
  515. 2.9
  516.  730 PROCsquare_sym(M(),Mt(),MtM())
  517. 2.9
  518.  740 PROCeigenvalues(MtM(),E())
  519. 2.9
  520.  750 ENDPROC
  521. 2.9
  522.  760 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-
  523. 2.9
  524.  770 DEFPROCtranspose(R(),Rt())
  525. 2.9
  526.  780 LOCAL v%,h%
  527. 2.9
  528.  790 v%=DIM(R(),1):h%=DIM(R(),2)
  529. 2.9
  530.  800 FOR r%=0 TO v%:FOR c%=0 TO h%:
  531. 2.9
  532. Rt(c%,r%)=R(r%,c%):NEXT:NEXT
  533. 2.9
  534.  810 ENDPROC
  535. 2.9
  536.  820 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-
  537. 2.9
  538.  830 DEFPROCsquare_sym(R(),Rt(),RtR())
  539. 2.9
  540.  840 RtR()=Rt().R()
  541. 2.9
  542.  850 ENDPROC
  543. 2.9
  544.  860 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ-
  545. 2.9
  546.  870 DEFPROCeigenvalues(RtR(),EV())
  547. 2.9
  548.  880 REM Eigenvalues are determined
  549. 2.9
  550.  from R-transposed x R, using the property that eigenvalues do not
  551. change by a similarity
  552. 2.9
  553.  890 REM ***  transformation. Rt.R is
  554. 2.9
  555.  decomposed in a lower and upper
  556. 2.9
  557.  tri-angular matrix, Rt.R=LU. Then
  558. 2.9
  559.  UL has the same eigenvalues as LU.
  560. 2.9
  561.  900 REM Repeating this process
  562. 2.9
  563.  iterates all non-diagonal elements              to 0, and the diagonal
  564. elements
  565. 2.9
  566.  to the eigenvalues.
  567. 2.9
  568.  910 :
  569. 2.9
  570.  920 REM E.D. Engelhardt, March 1989
  571. 2.9
  572.  930 :
  573. 2.9
  574.  940 LOCAL L(),U(),UL(),h%,c%,r%,t%,
  575. 2.9
  576. repeat,max,iterations%
  577. 2.9
  578.  950 h%=DIM(EV(),1)
  579. 2.9
  580.  960 DIM L(h%,h%),U(h%,h%),UL(h%,h%)
  581. 2.9
  582.  970 :
  583. 2.9
  584.  980 PRINTTAB(1,30)öIteration       : ò
  585. 2.9
  586.  :REM This info may be left out
  587. 2.9
  588.  990 :
  589. 2.9
  590. 1000 repeat=TRUE
  591. 2.9
  592. 1010 REPEAT
  593. 2.9
  594. 1020   iterations%+=1:PRINTTAB(13,30)
  595. 2.9
  596. iterations%  :REM may be left out
  597. 2.9
  598. 1030   REM Calculate lower triangle
  599. 2.9
  600.  L of RtR
  601. 2.9
  602. 1040   FOR c%=0 TO h%:FOR r%=c% TO h%
  603. 2.9
  604. 1050     L(r%,c%)=RtR(r%,c%):t%=c%-1
  605. 2.9
  606. 1060     IF t%>=0 FORt%=t%TO0STEP-1:
  607. 2.9
  608. L(r%,c%)=L(r%,c%)-L(r%,t%)
  609. 2.9
  610. *L(c%,t%):NEXT
  611. 2.9
  612. 1070     IF r%>c% THEN L(r%,c%)=
  613. 2.9
  614. L(r%,c%)/L(c%,c%)
  615. 2.9
  616. 1080     IF r%=c% IF L(r%,c%)<0 THEN:
  617. 2.9
  618. FOR t%=0 TO h%:L(t%,c%)=0:NEXT
  619. 2.9
  620. 1090     IF r%=c% L(r%,c%)=SQR L(r%,c%)
  621. 2.9
  622. 1100     IF r%=c% AND L(r%,c%)=0 r%=h%
  623. 2.9
  624. 1110   NEXT:NEXT
  625. 2.9
  626. 1120   :
  627. 2.9
  628. 1130   PROCtranspose(L(),U())
  629. 2.9
  630. 1140   :
  631. 2.9
  632. 1150   REM Matrix similar to RtR (ie
  633. 2.9
  634.  having same eigenvalues) is UL
  635. 2.9
  636. 1160   UL()=U().L()
  637. 2.9
  638. 1170   :
  639. 2.9
  640. 1180   REM Determine if diagonals of
  641. 2.9
  642.  RtR and UL are equivalent
  643. 2.9
  644. 1190   t%=0
  645. 2.9
  646. 1200   REPEAT
  647. 2.9
  648. 1210     IF UL(t%,t%)<>RtR(t%,t%)
  649. 2.9
  650. :repeat=FALSE
  651. 2.9
  652. 1220     t%+=1:IF t%>h% repeat=FALSE
  653. 2.9
  654. 1230   UNTIL repeat=FALSE
  655. 2.9
  656. 1240   IF t%<=h% repeat=TRUE:RtR()=
  657. 2.9
  658. UL()
  659. 2.9
  660. 1250 UNTIL repeat=FALSE
  661. 2.9
  662. 1260 :
  663. 2.9
  664. 1270 REM Put eigenvalues smaller then
  665. 2.9
  666.  non-diagonal elements to zero
  667. 2.9
  668. 1280 FOR t%=0 TO h%:UL(t%,t%)=0:NEXT
  669. 2.9
  670. 1290 FOR r%=1 TO h%-1:FOR c%=1 TO r%
  671. 2.9
  672. 1300   IF ABS UL(r%,c%)>max max=ABS
  673. 2.9
  674.  UL(r%,c%)
  675. 2.9
  676. 1310 NEXT:NEXT
  677. 2.9
  678. 1320 FOR c%=0 TO h%
  679. 2.9
  680. 1330   EV(c%)=RtR(c%,c%):IF EV(c%)<=
  681. 2.9
  682. max EV(c%)=0
  683. 2.9
  684. 1340 NEXT
  685. 2.9
  686. 1360 ENDPROC
  687. 2.9
  688. 1370 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  689. 2.9
  690. 1380 DEFPROCprint
  691. 2.9
  692. 1390 VDU 14
  693. 2.9
  694. 1400 CLS:PRINTÉö Rows       : òSTR$
  695. 2.9
  696. row%Éö Columns    : òSTR$col%
  697. 2.9
  698. 1410 PRINTÉö Time(centisecs) : ò;STR$
  699. 2.9
  700. (end%-start%)Éæ
  701. 2.9
  702. 1420 PRINTö ******** Eigenvalues : òÉ
  703. 2.9
  704. 1430 FOR c%=0 TO col%
  705. 2.9
  706. 1440   PRINT E(c%)
  707. 2.9
  708. 1450 NEXT:PRINT
  709. 2.9
  710. 1460 VDU 15
  711. 2.9
  712. 1470 ENDPROC
  713.