,.
!
l
!
t.
i
C
VECTOR
·ADDITION
AND SUBTRACTION_
( gram Outline
V .;,.:tor addi!ionSc'and subtractions are easy
to·
·
perform.,However/it
is
noCso
easyto
see the.
q
lntity
and·direction
of
vectors th.us calculated.
·
>T
is-program takes advanta.ge:ofthe dot-grai>!iics
0
• capability
of
the
fP-200to
represent vectors
in
t,t..,
form
of
graphs.··
(
PSIM,tl
--·
V ..
1en
the program is started, it .displays
the
message "shown in
O,
wafringf~r
data
input. The scale in this message indicates
the.amount
represented by a single
dot.
It
c termines
the
ranges
of
X and Y
that
c3:n
be_
input.The
message shows
that
the current
s
Je
is
1.0/d (dot), indicating
that
both
Xand
Y have a range
of
-31.0
to 31.0.
The program then asks for a new scale. Determine the new scale based
on
the
magrii~
t
11
•ies
of
vectors.to be input.
{lnjJils
case,
there
is
110
need
to
considerthe
magnitude.'
-
cc.
the resulting vect(?b)
When
you
input
a
scale
-0f?say,·o.s;
the
programagain
.
..displays:·~~',
·.
·
•.f~~:~ii1li~l~iili~~-t:~!f
I~iit~i~:,i:::
r
nLof
·the
.pos1t1on
vector;
When:
the
data
151nputl
the
program asks whether ant\:;:Li,,: •
addition
or
a·subtraction
is
to
be
performed.
Key·
in
a_•,...•
for
subtraction. Press .the
g)">
.
.,,
k-y
for
addition.
·.
. . .
,;:
:r_,;---
, ..
-··
.
·......
. . . - . . -
- -
1e
programfthen'draws the
input
vector~
sh_gv/11Jn
O;Jn the
cise
of
subtraction~a. _ -
'-'
is
placed~in
front
of
the first parenthesis.
Up
to
llvectors
can be
input
for calcula;'•
tion. Note that' when more than-five vectors are inp-ut,
the
p·receding vectors disappear,,
i · ::iuentially
to
prevent the screen
displayfromoverflowing.
(The result
of
the-calcula-
;__
Jn
is
unaffected.) I
After inputting
all
the vectors,
input
0 for X and
Y.
The
program then displays the
1 5uft, which blinks. If the result exceeds the range
that
can be displayed on the
, rrent scale, the scale
is
automatically adjusted such
that
the display can be continued.
Pressing any key on the keyboard causes a return
to
the beginning
of
the program.
125