EasyManuals Logo

Radio Shack Telephone Interface II Manual

Radio Shack Telephone Interface II
126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #66 background imageLoading...
Page #66 background image
Example
2:
PROGRAM
4
<
Approximate
definite
integral
by
Simpson's
method
>
Formula
Compute
a
definite
integral
by
using
Simpson's
rule.
S
=
f
x
2Pj
(x)dx
=
"=-
t
<
Yo
+
V2
P
)
+
4
(
yi
+
y 3
+
+
y2p
_!
)
+
2(y
2
+y
4
+
+
y
2p
-2>]
2p
p
: number
of
divisions
[Example]
y
=jc
3
-
2x
2
-x
+
2
=
{{x-2)x-
1)x
+
2
J
ydx
=
o
12
Write
in the
function,
as a
subroutine,
after
line
500.
Set
to
PRO
mode (by
pressing
[mode]
key).
500
Y
=
((x-2)*x-1)*x
+
2e
510
RETURN
S
This
ends
writing.
Next,
change
to DEF
mode,
and execute.
*
Programming
Note
10:
"A":
INPUT
"X0
=
";
D,"X2P=
";
E,
"P=";F
20: B=
(E-D)/2/F
30:
A
=
0:
X=
D:GOSUB500
40: A=Y
+
A:X
=
X
+
B:
GOSUB
500
50:
A-
Y*4
+
A: X
=
X
+
B: GOSUB
500
60:
A= Y
+
A: F
=
F
-
1
70:
IF
FOOGOT0
40
80:
C
=
A
*B/3
90: BEEP
3: PRINT
"AIMS.",
C
100:
END
500:
Y=
((X-2)*X-
1)*X
+
2
510:
RETURN
Some
Notes
to help
you understand
this
program:
Line
30 sets
memory
"A" to accumulate 'Y'
values.
Memory
"X" is to be 'X', Since the
initial
value
of
'X'
is
in memory
"D", first
input
value
of
"D" to "X". The
GOSUBs to
calculate first
'Y'
value.
Line
40
adds
calculated 'Y'
to memory "A".
'X'
is incremented
by 'H\ Again
GOSOBs
to
calculate
next
'Y'
value.
Now,
the order of
'X'
and
'Y'
is of odd
number.
According
to the
Program
we have
to multiply
by
4. So
line 50 multiplies by
4.
'X' is
incremented
and
GOSUBs.
63

Other manuals for Radio Shack Telephone Interface II

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Radio Shack Telephone Interface II and is the answer not in the manual?

Radio Shack Telephone Interface II Specifications

General IconGeneral
BrandRadio Shack
ModelTelephone Interface II
CategoryDesktop
LanguageEnglish

Related product manuals