home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1995 / ARCHIVE95.iso / discs / pipeline / 4_10 / ComplexNos / 9107 next >
Text File  |  1991-06-09  |  16KB  |  304 lines

  1. %OP%JUN
  2. %OP%DP0
  3. %OP%DFT
  4. %OP%PL0
  5. %OP%HM0
  6. %OP%FM0
  7. %OP%BM0
  8. %OP%LM4
  9. %CO:A,72,72%PipeLine - July 1991
  10. Copyright - ABACUS TRAINING
  11.  
  12. Author - Gerald L Fitton - 7th June 1991
  13.  
  14.  
  15. Firstly, some of the matters arising from your PipeLine correspondence 
  16. and then a short tutorial on including complex numbers in a PipeDream 
  17. spreadsheet.
  18.  
  19. Attainment Targets
  20. Malcolm Cowell has brought out version 1.2 of this PipeDream 
  21. application.  The version I have is a demonstration version which 
  22. allows the setting up of an extendable database for recording and 
  23. reporting pupil performance against the Science National Curriculum 
  24. Attainment Targets.  Entries can be made up against each pupil in a 
  25. tutor group for each of seventeen Attainment Targets for all ten levels 
  26. and the various statements within levels.  I can send you a copy of 
  27. this demonstration version; the full version is obtainable from Malcolm 
  28. for about ú3.00.
  29.  
  30. Dedicated Time Calculator
  31. Bob Ames has written to me to let me know that there is a dedicated 
  32. portable Time Calculator available that he strongly recommends to 
  33. anyone needing to add up (or do other arithmetic calculations) where 
  34. the values are measured in Hr Min Sec format (rather than decimals of 
  35. an hour or minute).  Please write to him at Ayton House, Ramsey 
  36. Heights, Huntingdon, Cambs, PE17 1RJ for more details.
  37.  
  38. !Help Bold Expressions
  39. Stephen Gaynor would like to know the best way of using printer 
  40. highlight codes to highlight expression slots.  Perhaps the simplest 
  41. example is to try to change to bold the slot that contains the sum of a 
  42. column of figures.  Stephen has a method which, he says, works rather 
  43. inelegantly.  In the past I've tried and failed.  My method is even 
  44. less elegant.  What I have had to do is to use Snapshot to turn the 
  45. numbers into text and then embolden the sum as text.  Stephen uses two 
  46. separate highlight codes, both of which are not turned off at the end 
  47. of the slot.  The first code turns on bold and the second turns it off.  
  48. If the first code (the turn on code) is placed in a slot just before 
  49. the sum then its effect continues through the slot containing the sum.  
  50. The second code is placed in a slot just after the slot containing the 
  51. sum.  Has anyone a better method?
  52.  
  53. Public Transport Calculations
  54. Peter Stoner is a Senior Public Transport Assistant based in Carlisle.  
  55. He uses PipeDream as a tool to help him with many aspects of bus route 
  56. planning.  His disc contains over 200Kb and, amongst other interesting 
  57. files, there is an 11Kb macro which will reverse a list of places.  
  58. Such a list forms part of a timetable for travelling in one direction.  
  59. Reverse the list before timetabling in the other direction.  I can see 
  60. that a time difference calculator which, having written out one set of 
  61. times, calculates a similar set of times backwards as a starting point 
  62. for the reverse route.  If you would like a copy of Peter's disc or 
  63. have anything you would like to contribute to his use of PipeDream this 
  64. way then send it to me and I will pass it on to Peter.
  65.  
  66. File conversions
  67. Send your files on a disc to me in the first instance and I will pass 
  68. them on, probably to Ian Williamson who has volunteered to coordinate 
  69. this area of interest.  In the more specialised field of Masterfile to 
  70. PipeDream conversion, Betty Mines has written a BASIC program that has 
  71. been most useful to her and might be to you.  David Holden has sent me 
  72. an Interword to PipeDream convertor which he describes as being a 
  73. temporary measure until he produces a new all formats convertor.
  74.  
  75. PipeLine in Berlin
  76. Reinhard G Giesder, Krefelderstr 20, W-1000 Berlin 21 asks if there are 
  77. any PipeLine readers in Berlin (or Germany) -- if you do then he would 
  78. like you to write to him.
  79.  
  80. Spark
  81. Let me try to clear up some confusion I might have caused.  Spark is a 
  82. program which compresses files.  The compressed program, application, 
  83. document, etc, is not corrupted in any way but is coded so that the 
  84. information within it takes up less bytes.  File compression has the 
  85. advantage that more files (or files which are more than 800 Kb long 
  86. such as huge sprites from an A4 scanner) can be squashed onto an 800 Kb 
  87. floppy disc.  If data is communicated electronically then it is usually 
  88. quicker to transfer a compressed file than the original.
  89.  
  90. If you have a file which has been compressed using Spark then you need 
  91. to expand it back to its original size before trying to use it.  The 
  92. program which compresses the files is called Spark and the program 
  93. which expands them is called SparkPlug.  David Pilling, who wrote 
  94. Spark, has made the second part, the expander, freely available but he 
  95. (rightly in my view) charges for the purchase of the compressor.  
  96. Thanks to SparkPlug (the expander) being made freely available, Spark 
  97. has become the standard compression format for the Archimedes files.  
  98.  
  99. Norwich Computer Services is a typical user of file compression.  NCS 
  100. has bought a copy of the Spark compressor and they use it to compress 
  101. files on many of the discs they sell.  On each of the discs of 
  102. compressed files NCS include a copy of the freely available program 
  103. needed to expand the compressed files.
  104.  
  105. On this month's Archive disc you will find a compressed version of 
  106. Daniel Dorling's bibliography.  Because of its size it has been 
  107. impossible to include this large PipeDream application in its 
  108. uncompressed form.  People vary in their reaction to finding compressed 
  109. files on discs they have bought.  Some feel they have got more bytes 
  110. for their money, some don't like the extra 'hassle' of unpacking the 
  111. files.  As an experiment on the July 1991 PipeLine disc I am going to 
  112. use Spark to compress some of the largest files.  A copy of SparkPlug 
  113. will be included on the disc.  None of the ReadMe files will be 
  114. compressed.
  115.  
  116. Please write to me and let me know if this use of compression is 
  117. acceptable to you and, more generally, how you feel about compressing 
  118. PipeDream applications.  I have other large databases to which similar 
  119. considerations apply.
  120.  
  121. [Note: Paul, I am leaving it to you to include SparkPlug and 
  122. instructions on the Archive disc]
  123.  
  124. Editing Macros
  125. In Pipedream @@ is a rather special character.  If you need what is 
  126. called a 'literal' @@ (ie a real live printed @@) then you must hit the @@ 
  127. key twice.  If you don't do this then the single @@ will tell PipeDream 
  128. that what follows is not to be printed literally (ie as you see it) but 
  129. must be interpreted as a PipeDream command.  A typical example is the 
  130. inclusion of a graphic with the command @@G:MyGraphic,50@@.  This command 
  131. will include the graphic file MyGraphic at 50%PC% of full scale.  More 
  132. common is a key definition which includes a sequence which starts with 
  133. "@@ and ends with @@".
  134.  
  135. The two lines below form part of my 'key' macro (which is automatically 
  136. loaded when PipeDream starts up).  My default printer font is Trinity 
  137. and so I have arranged that pressing the three keys <Ctrl+Shift+F1> 
  138. simultaneously invokes the insert font command.  By the way, the 
  139. sequence \FQ|m ensures that a blank default document is not called up 
  140. as PipeDream is installed.
  141.  
  142. \Cdf|i "Ctrl-Shift F1" |i "@@F:Homerton.Bold@@" |m
  143. \FQ|m
  144.  
  145. If you create a macro which includes some bracketed command such as the 
  146. font "@@<command>@@" above, then, when you load it into PipeDream you 
  147. will not see the command unless you place the cursor in the line 
  148. containing the command.  For example you must place the cursor in the 
  149. line containing "@@F:Homerton.Bold@@" to see it.  Most of you get this 
  150. far and understand what is going on.  Now here's the tricky bit.  If 
  151. you save the macro as it now appears the command bracketed by the @@ 
  152. signs and the @@ signs themselves disappear!  The result is that the 
  153. macro doesn't work any more.  If you reload it to find out why then you 
  154. will see the lines below.  The first of these lines does not change 
  155. when you put the cursor in that line because the @@ signs have gone!
  156.  
  157. \Cdf|i "Ctrl-Shift F1" |i "" |m
  158. \FQ|m
  159.  
  160. If you get to this point where the @@ signs are gone then you have to 
  161. start again.  However, let's go back to the earlier macro with the 
  162. @@<command>@@ present but showing only when the cursor is in that first 
  163. line.  What you have to do is <ctrl - BSE>, (Block SEarch and replace) 
  164. to substitute @@@ for @@ wherever it appears.  Do this before you Save 
  165. the macro and it will still work after saving.  What happens is that 
  166. the double @@@ is replaced by a single @@ during the saving process; you 
  167. start the save with two @@ you finish the save with one @@.
  168.  
  169. If you are totally confused by this (I hope not) then I suggest that 
  170. you try using Acorn's !Edit to edit macros rather than PipeDream since 
  171. @@ signs in Edit are always treated literally.
  172.  
  173. Complex Numbers
  174. Complex numbers are part of most GCE A level maths courses as well as 
  175. being obligatory for BTEC Engineers and many other courses.  The 
  176. paragraphs below might prove of particular interest to those of you 
  177. teaching complex numbers and who need quick access to numerical 
  178. examples.  Of more interest to the educationalist is that I have found 
  179. that getting students to use actual numbers gives them a much better 
  180. 'feel' for what is going on than just manipulating formulae.  'Hands 
  181. on' learning is particularly effective for the practical engineer, the 
  182. teaching (or is it learning now?) objectives are grasped much more 
  183. quickly.  I have received comments such as "I've never understood 
  184. complex numbers before" from mature engineers (with a decade of field 
  185. work behind them) after only a couple of hours of entering actual 
  186. numbers into a spreadsheet such as an extended version of the 
  187. spreadsheet Complex01 described below.
  188.  
  189. First an introduction to complex numbers for the beginner.
  190.  
  191. I have yet to find a hand calculator which will let me find the square 
  192. root of -4 or the logarithm of -1 even though, in the domain of complex 
  193. numbers both of these exist.  Perhaps the most famous complex number is 
  194. the square root of -1.  Sqr(-1) has two answers.  Mathematicians use 
  195. the symbol i and Engineers use j (because they use i for electric 
  196. current -- well, that's what I've been told) for the positive square 
  197. root of -1.  The other square root of -1 is -i.  I prefer to say that 
  198. iá*áiá=á-1 rather than talk about i being the square root of -1.
  199.  
  200. Complex numbers can be considered to have two parts, a Real part and an 
  201. Imaginary part.  These may be visualised as the x any y coordinates of 
  202. a point on a two dimensional sheet of graph paper.  A complex number 
  203. such as (3á+á4i) is said to have a Real (x) part of 3 and an Imaginary 
  204. (y) part of 4 and may be plotted as x and y coordinates on the so 
  205. called Argand Diagram (named after its inventor).
  206.  
  207. After addition and subtraction, perhaps the simplest thing that can be 
  208. done with a complex number is multiplication.  For example the square 
  209. of (3á+á4i) is (3á+á4i)(3á+á4i) which becomes 9á+á24i +á16i%H6%2%H6%.  Now, 
  210. remember that i%H6%2%H6% is really -1 and you get 9á+á24iá-á16 as the answer.  
  211. This can be simplified to -7á+á24i, a Real part of -7 and an Imaginary 
  212. part of +24.  I think better, way of looking at complex numbers is that 
  213. they are really pairs of Real numbers for which the symbol i is used as 
  214. a separator and, for which, iá*áiá=á-1.
  215.  
  216. As an example this month I shall show you how to raise a complex number 
  217. to any power, even a complex power.  The two numbers called z and w 
  218. represent complex numbers and I find z^w in the application I have 
  219. called Complex01.  The file Complex01 is on the Archive monthly disc.  
  220. Figure 1 is a snapshot of Complex01 being used to show that with zá=ái 
  221. and wá=á2 we find i^2á=á-1.  The intermediate steps are to find the 
  222. logarithm of z, multiply the logarithm by w and then use the 
  223. exponential function to find the inverse logarithm.  For those of you 
  224. more familiar with Real numbers, try out the formulae given in text 
  225. form in cell A13 of figure 1, z^w=exp(w*ln(z)), on your calculator 
  226. (using a positive Real for z and a Real for w) and convince yourself 
  227. that it works.
  228.  
  229. All the 'clever' formulae are in the cell block B11C13 and you can see 
  230. them in text form in figure 2.  If you want to follow through this 
  231. tutorial then you can either type them in as expressions or load the 
  232. file Complex01 from the Archive monthly disc.
  233.  
  234. When you have the Complex01 spreadsheet the next thing you will want to 
  235. do is to show that powers of negative Real numbers work out correctly.  
  236. Figure 3 is a snapshot of the spreadsheet correctly finding that 
  237. (-2)^3á=á-8.  The intermediate results show that ln(z) has an Imaginary 
  238. part which, to 4 decimal places, is 3.1416.  Do you recognise this 
  239. number?  Use the spreadsheet to prove that ln(-1)á=ái*PI by entering -1 
  240. into B8 (the Real part of z).
  241.  
  242. Figure 4 is a snapshot that shows that (1á+ái)^4á=á-4.  You can work 
  243. this out by using the usual algebraic multiplication formulae (or the 
  244. binomial expansion) and replacing i^2 with -1 whenever it occurs.
  245.  
  246. Reciprocals (a common GCE A level problem) are found by making wá=á-1.  
  247. Put wá=á0.5 to find the principal square root; the second root is a bit 
  248. harder to find but it can be deduced from the principal root.
  249.  
  250. If you have an interest in complex numbers then please write and let me 
  251. know what sort of numerical examples you would like to see in 
  252. spreadsheet format and I'll see what I can do for you.  On the next 
  253. PipeLine disc, July 1991, I have included more functions of complex 
  254. variables such as the trigonometrical and hyperbolic functions (and 
  255. their inverses) so that you can see how they are implemented.  I would 
  256. like to hear from anyone who has done (or wants) a complex numerical 
  257. integration (eg to find a value for the Gamma function).
  258.  
  259. PipeDream V 3.14
  260. It looks to me as if Version 3.14 of PipeDream is fairly 'stable'.  My 
  261. information from Colton Software is that there is no further upgrade 
  262. planned at present.  So, if you haven't yet upgraded from an earlier 
  263. version then you should do that rather than wait for the next upgrade.  
  264. For those of you with a current subscription to PipeLine I have an 
  265. official upgrade kit from Colton Software; if you send me your master 
  266. disc together with a label and a stamp I will get an upgrade back to 
  267. you by return post.  For those of you who are not PipeLine subscribers, 
  268. you can get a similar service from Colton Software direct but, perhaps, 
  269. not by return of post.
  270.  
  271. In Conclusion
  272. Once or twice a month I get letters which have been forwarded to me 
  273. from Norwich Computer Services.  I have no connection with NCS other 
  274. than writing this monthly column.  Letters should be addressed to me at 
  275. the Abacus Training address given on the inside rear cover of Archive.  
  276. Incidentally, I have no connection with Colton Software either.  Apart 
  277. from the help which Colton Software give me with your problems, we 
  278. operate completely independently of each other.  My 'day job' is as a 
  279. Lecturer as Swindon College of Further Education where I teach mainly 
  280. Maths and Stats (and their applications).  To me, at College, the 
  281. computer is a tool (which I employ considerably as a student centred 
  282. teaching resource) rather than an end in itself.  We have nothing as 
  283. powerful as an Archimedes there -- the standard is the 286 PC.
  284.  
  285. I created Abacus Training about ten years ago as a way of keeping my 
  286. personal accounts separate from anything I might earn 'on the side' as 
  287. a private tutor.  A year ago, when I started selling the quarterly 
  288. PipeLine discs, it seemed to me that using Abacus Training for this 
  289. would keep the accounts of PipeLine together so that I could keep track 
  290. of the loss (or profit) I was making.  We are not a corporate body and 
  291. our turnover is not sufficient to push us over the VAT threshold.
  292.  
  293. I am pleased with the way that PipeLine has developed a sort of User 
  294. Group 'feel'.  I do enjoy reading your letters and trying out the 
  295. programs and applications which you send in.  I get a kick out of being 
  296. able to share the knowledge I have gleaned from you (and my own 
  297. efforts) about PipeDream and the Archimedes or when I can help someone 
  298. overcome what to them is an insuperable problem.  I suspect this secret 
  299. thrill rather than the money is why Paul set up Norwich Computer 
  300. Services in the first place.  Like Paul, I don't always succeed, but 
  301. when I do help somebody it feels good.  I'm sure it is that which 
  302. motivates me more than anything else so please keep your letters and 
  303. discs coming in.
  304.