home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1995
/
ARCHIVE95.iso
/
discs
/
pipeline
/
4_10
/
ComplexNos
/
9107
next >
Wrap
Text File
|
1991-06-09
|
16KB
|
304 lines
%OP%JUN
%OP%DP0
%OP%DFT
%OP%PL0
%OP%HM0
%OP%FM0
%OP%BM0
%OP%LM4
%CO:A,72,72%PipeLine - July 1991
Copyright - ABACUS TRAINING
Author - Gerald L Fitton - 7th June 1991
Firstly, some of the matters arising from your PipeLine correspondence
and then a short tutorial on including complex numbers in a PipeDream
spreadsheet.
Attainment Targets
Malcolm Cowell has brought out version 1.2 of this PipeDream
application. The version I have is a demonstration version which
allows the setting up of an extendable database for recording and
reporting pupil performance against the Science National Curriculum
Attainment Targets. Entries can be made up against each pupil in a
tutor group for each of seventeen Attainment Targets for all ten levels
and the various statements within levels. I can send you a copy of
this demonstration version; the full version is obtainable from Malcolm
for about ú3.00.
Dedicated Time Calculator
Bob Ames has written to me to let me know that there is a dedicated
portable Time Calculator available that he strongly recommends to
anyone needing to add up (or do other arithmetic calculations) where
the values are measured in Hr Min Sec format (rather than decimals of
an hour or minute). Please write to him at Ayton House, Ramsey
Heights, Huntingdon, Cambs, PE17 1RJ for more details.
!Help Bold Expressions
Stephen Gaynor would like to know the best way of using printer
highlight codes to highlight expression slots. Perhaps the simplest
example is to try to change to bold the slot that contains the sum of a
column of figures. Stephen has a method which, he says, works rather
inelegantly. In the past I've tried and failed. My method is even
less elegant. What I have had to do is to use Snapshot to turn the
numbers into text and then embolden the sum as text. Stephen uses two
separate highlight codes, both of which are not turned off at the end
of the slot. The first code turns on bold and the second turns it off.
If the first code (the turn on code) is placed in a slot just before
the sum then its effect continues through the slot containing the sum.
The second code is placed in a slot just after the slot containing the
sum. Has anyone a better method?
Public Transport Calculations
Peter Stoner is a Senior Public Transport Assistant based in Carlisle.
He uses PipeDream as a tool to help him with many aspects of bus route
planning. His disc contains over 200Kb and, amongst other interesting
files, there is an 11Kb macro which will reverse a list of places.
Such a list forms part of a timetable for travelling in one direction.
Reverse the list before timetabling in the other direction. I can see
that a time difference calculator which, having written out one set of
times, calculates a similar set of times backwards as a starting point
for the reverse route. If you would like a copy of Peter's disc or
have anything you would like to contribute to his use of PipeDream this
way then send it to me and I will pass it on to Peter.
File conversions
Send your files on a disc to me in the first instance and I will pass
them on, probably to Ian Williamson who has volunteered to coordinate
this area of interest. In the more specialised field of Masterfile to
PipeDream conversion, Betty Mines has written a BASIC program that has
been most useful to her and might be to you. David Holden has sent me
an Interword to PipeDream convertor which he describes as being a
temporary measure until he produces a new all formats convertor.
PipeLine in Berlin
Reinhard G Giesder, Krefelderstr 20, W-1000 Berlin 21 asks if there are
any PipeLine readers in Berlin (or Germany) -- if you do then he would
like you to write to him.
Spark
Let me try to clear up some confusion I might have caused. Spark is a
program which compresses files. The compressed program, application,
document, etc, is not corrupted in any way but is coded so that the
information within it takes up less bytes. File compression has the
advantage that more files (or files which are more than 800 Kb long
such as huge sprites from an A4 scanner) can be squashed onto an 800 Kb
floppy disc. If data is communicated electronically then it is usually
quicker to transfer a compressed file than the original.
If you have a file which has been compressed using Spark then you need
to expand it back to its original size before trying to use it. The
program which compresses the files is called Spark and the program
which expands them is called SparkPlug. David Pilling, who wrote
Spark, has made the second part, the expander, freely available but he
(rightly in my view) charges for the purchase of the compressor.
Thanks to SparkPlug (the expander) being made freely available, Spark
has become the standard compression format for the Archimedes files.
Norwich Computer Services is a typical user of file compression. NCS
has bought a copy of the Spark compressor and they use it to compress
files on many of the discs they sell. On each of the discs of
compressed files NCS include a copy of the freely available program
needed to expand the compressed files.
On this month's Archive disc you will find a compressed version of
Daniel Dorling's bibliography. Because of its size it has been
impossible to include this large PipeDream application in its
uncompressed form. People vary in their reaction to finding compressed
files on discs they have bought. Some feel they have got more bytes
for their money, some don't like the extra 'hassle' of unpacking the
files. As an experiment on the July 1991 PipeLine disc I am going to
use Spark to compress some of the largest files. A copy of SparkPlug
will be included on the disc. None of the ReadMe files will be
compressed.
Please write to me and let me know if this use of compression is
acceptable to you and, more generally, how you feel about compressing
PipeDream applications. I have other large databases to which similar
considerations apply.
[Note: Paul, I am leaving it to you to include SparkPlug and
instructions on the Archive disc]
Editing Macros
In Pipedream @@ is a rather special character. If you need what is
called a 'literal' @@ (ie a real live printed @@) then you must hit the @@
key twice. If you don't do this then the single @@ will tell PipeDream
that what follows is not to be printed literally (ie as you see it) but
must be interpreted as a PipeDream command. A typical example is the
inclusion of a graphic with the command @@G:MyGraphic,50@@. This command
will include the graphic file MyGraphic at 50%PC% of full scale. More
common is a key definition which includes a sequence which starts with
"@@ and ends with @@".
The two lines below form part of my 'key' macro (which is automatically
loaded when PipeDream starts up). My default printer font is Trinity
and so I have arranged that pressing the three keys <Ctrl+Shift+F1>
simultaneously invokes the insert font command. By the way, the
sequence \FQ|m ensures that a blank default document is not called up
as PipeDream is installed.
\Cdf|i "Ctrl-Shift F1" |i "@@F:Homerton.Bold@@" |m
\FQ|m
If you create a macro which includes some bracketed command such as the
font "@@<command>@@" above, then, when you load it into PipeDream you
will not see the command unless you place the cursor in the line
containing the command. For example you must place the cursor in the
line containing "@@F:Homerton.Bold@@" to see it. Most of you get this
far and understand what is going on. Now here's the tricky bit. If
you save the macro as it now appears the command bracketed by the @@
signs and the @@ signs themselves disappear! The result is that the
macro doesn't work any more. If you reload it to find out why then you
will see the lines below. The first of these lines does not change
when you put the cursor in that line because the @@ signs have gone!
\Cdf|i "Ctrl-Shift F1" |i "" |m
\FQ|m
If you get to this point where the @@ signs are gone then you have to
start again. However, let's go back to the earlier macro with the
@@<command>@@ present but showing only when the cursor is in that first
line. What you have to do is <ctrl - BSE>, (Block SEarch and replace)
to substitute @@@ for @@ wherever it appears. Do this before you Save
the macro and it will still work after saving. What happens is that
the double @@@ is replaced by a single @@ during the saving process; you
start the save with two @@ you finish the save with one @@.
If you are totally confused by this (I hope not) then I suggest that
you try using Acorn's !Edit to edit macros rather than PipeDream since
@@ signs in Edit are always treated literally.
Complex Numbers
Complex numbers are part of most GCE A level maths courses as well as
being obligatory for BTEC Engineers and many other courses. The
paragraphs below might prove of particular interest to those of you
teaching complex numbers and who need quick access to numerical
examples. Of more interest to the educationalist is that I have found
that getting students to use actual numbers gives them a much better
'feel' for what is going on than just manipulating formulae. 'Hands
on' learning is particularly effective for the practical engineer, the
teaching (or is it learning now?) objectives are grasped much more
quickly. I have received comments such as "I've never understood
complex numbers before" from mature engineers (with a decade of field
work behind them) after only a couple of hours of entering actual
numbers into a spreadsheet such as an extended version of the
spreadsheet Complex01 described below.
First an introduction to complex numbers for the beginner.
I have yet to find a hand calculator which will let me find the square
root of -4 or the logarithm of -1 even though, in the domain of complex
numbers both of these exist. Perhaps the most famous complex number is
the square root of -1. Sqr(-1) has two answers. Mathematicians use
the symbol i and Engineers use j (because they use i for electric
current -- well, that's what I've been told) for the positive square
root of -1. The other square root of -1 is -i. I prefer to say that
iá*áiá=á-1 rather than talk about i being the square root of -1.
Complex numbers can be considered to have two parts, a Real part and an
Imaginary part. These may be visualised as the x any y coordinates of
a point on a two dimensional sheet of graph paper. A complex number
such as (3á+á4i) is said to have a Real (x) part of 3 and an Imaginary
(y) part of 4 and may be plotted as x and y coordinates on the so
called Argand Diagram (named after its inventor).
After addition and subtraction, perhaps the simplest thing that can be
done with a complex number is multiplication. For example the square
of (3á+á4i) is (3á+á4i)(3á+á4i) which becomes 9á+á24i +á16i%H6%2%H6%. Now,
remember that i%H6%2%H6% is really -1 and you get 9á+á24iá-á16 as the answer.
This can be simplified to -7á+á24i, a Real part of -7 and an Imaginary
part of +24. I think better, way of looking at complex numbers is that
they are really pairs of Real numbers for which the symbol i is used as
a separator and, for which, iá*áiá=á-1.
As an example this month I shall show you how to raise a complex number
to any power, even a complex power. The two numbers called z and w
represent complex numbers and I find z^w in the application I have
called Complex01. The file Complex01 is on the Archive monthly disc.
Figure 1 is a snapshot of Complex01 being used to show that with zá=ái
and wá=á2 we find i^2á=á-1. The intermediate steps are to find the
logarithm of z, multiply the logarithm by w and then use the
exponential function to find the inverse logarithm. For those of you
more familiar with Real numbers, try out the formulae given in text
form in cell A13 of figure 1, z^w=exp(w*ln(z)), on your calculator
(using a positive Real for z and a Real for w) and convince yourself
that it works.
All the 'clever' formulae are in the cell block B11C13 and you can see
them in text form in figure 2. If you want to follow through this
tutorial then you can either type them in as expressions or load the
file Complex01 from the Archive monthly disc.
When you have the Complex01 spreadsheet the next thing you will want to
do is to show that powers of negative Real numbers work out correctly.
Figure 3 is a snapshot of the spreadsheet correctly finding that
(-2)^3á=á-8. The intermediate results show that ln(z) has an Imaginary
part which, to 4 decimal places, is 3.1416. Do you recognise this
number? Use the spreadsheet to prove that ln(-1)á=ái*PI by entering -1
into B8 (the Real part of z).
Figure 4 is a snapshot that shows that (1á+ái)^4á=á-4. You can work
this out by using the usual algebraic multiplication formulae (or the
binomial expansion) and replacing i^2 with -1 whenever it occurs.
Reciprocals (a common GCE A level problem) are found by making wá=á-1.
Put wá=á0.5 to find the principal square root; the second root is a bit
harder to find but it can be deduced from the principal root.
If you have an interest in complex numbers then please write and let me
know what sort of numerical examples you would like to see in
spreadsheet format and I'll see what I can do for you. On the next
PipeLine disc, July 1991, I have included more functions of complex
variables such as the trigonometrical and hyperbolic functions (and
their inverses) so that you can see how they are implemented. I would
like to hear from anyone who has done (or wants) a complex numerical
integration (eg to find a value for the Gamma function).
PipeDream V 3.14
It looks to me as if Version 3.14 of PipeDream is fairly 'stable'. My
information from Colton Software is that there is no further upgrade
planned at present. So, if you haven't yet upgraded from an earlier
version then you should do that rather than wait for the next upgrade.
For those of you with a current subscription to PipeLine I have an
official upgrade kit from Colton Software; if you send me your master
disc together with a label and a stamp I will get an upgrade back to
you by return post. For those of you who are not PipeLine subscribers,
you can get a similar service from Colton Software direct but, perhaps,
not by return of post.
In Conclusion
Once or twice a month I get letters which have been forwarded to me
from Norwich Computer Services. I have no connection with NCS other
than writing this monthly column. Letters should be addressed to me at
the Abacus Training address given on the inside rear cover of Archive.
Incidentally, I have no connection with Colton Software either. Apart
from the help which Colton Software give me with your problems, we
operate completely independently of each other. My 'day job' is as a
Lecturer as Swindon College of Further Education where I teach mainly
Maths and Stats (and their applications). To me, at College, the
computer is a tool (which I employ considerably as a student centred
teaching resource) rather than an end in itself. We have nothing as
powerful as an Archimedes there -- the standard is the 286 PC.
I created Abacus Training about ten years ago as a way of keeping my
personal accounts separate from anything I might earn 'on the side' as
a private tutor. A year ago, when I started selling the quarterly
PipeLine discs, it seemed to me that using Abacus Training for this
would keep the accounts of PipeLine together so that I could keep track
of the loss (or profit) I was making. We are not a corporate body and
our turnover is not sufficient to push us over the VAT threshold.
I am pleased with the way that PipeLine has developed a sort of User
Group 'feel'. I do enjoy reading your letters and trying out the
programs and applications which you send in. I get a kick out of being
able to share the knowledge I have gleaned from you (and my own
efforts) about PipeDream and the Archimedes or when I can help someone
overcome what to them is an insuperable problem. I suspect this secret
thrill rather than the money is why Paul set up Norwich Computer
Services in the first place. Like Paul, I don't always succeed, but
when I do help somebody it feels good. I'm sure it is that which
motivates me more than anything else so please keep your letters and
discs coming in.