home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 56 / 64er_Magazin_Sonderheft_56_19xx_Markt__Technik_de_Side_B.d64 / fourier (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  17KB  |  629 lines

  1. 10 dimy(100),y1(70),a(100),aa(100),ab(100),b(100),x(100)
  2. 20 e=53280:pokee,1:rem  rahmenfarbe
  3. 30 pokee+1,1:rem  hintergrundfarbe
  4. 40 poke646,6:rem  cursorfarbe
  5. 50 pl=49152:rem  plot-start
  6. 60 hc=49344:rem  hardcopy-start
  7. 70 printchr$(14):printchr$(8)
  8. 80 printchr$(147):print"      ****************************"
  9. 90 print"      *                          *"
  10. 100 print"      *        [198]ourier-          *"
  11. 110 print"      *                          *"
  12. 120 print"      *  [193]nalyse- und [211]ynthese-  *"
  13. 130 print"      *                          *"
  14. 140 print"      *        [208]rogramm          *"
  15. 150 print"      *                          *"
  16. 160 print"      ****************************"
  17. 170 print:print"            [205]anfred [203]lemenz"
  18. 180 print:print"               [194]ayreuth"
  19. 190 ifpeek(pl)<>169thenrestore:fori=0to304:reada:pokepl+i,a:next
  20. 200 poke198,0
  21. 210 print:print:print"  [198]arben aendern: [198]1[146] = [195]ursor"
  22. 220 print"                  [198]3[146] = [200]intergrund"
  23. 230 print"                  [198]5[146] = [210]ahmen"
  24. 240 print"                  [198]7[146] = [203]urzbeschreibung"
  25. 250 print:print"               [211]pace[146] = [215]eiter":printchr$(145)
  26. 260 gett$
  27. 270 ift$=chr$(133)thenpoke646,(peek(646)+1)and15:goto80
  28. 280 ift$=chr$(134)thenpokee+1,(peek(e+1)+1)and15
  29. 290 ift$=chr$(135)thenpokee,(peek(e)+1)and15
  30. 300 ift$=chr$(136)then5840
  31. 310 ift$=chr$(32)then340
  32. 320 goto260
  33. 330 :
  34. 340 printchr$(147):print:print"    [211]ie haben die [215]ahl zwischen"
  35. 350 print:print:print" 1[146]  [193]nalyse einer gegebenen [211]chwingung"
  36. 360 print:print:print" 2[146]  [211]ynthese einer gegebenen [211]chwingung"
  37. 370 print:print:print" 3[146]  [198]requenzspektrum zeigen"
  38. 380 print:print:print" 4[146]  [196]irectory"
  39. 390 print:print:print" 5[146]  [203]urzbeschreibung"
  40. 400 print:print:print" 6[146]  [197]nde"
  41. 410 print:print:print"        [215]elches [208]rogramm ? ";:gosub5910:p=val(h$)
  42. 420 ifp<1orp>6then340
  43. 430 onpgoto450,2080,3030,5260,5840,5500
  44. 440 rem analyse
  45. 450 printchr$(147):print"  [196]ieser [208]rogrammteil analysiert"
  46. 460 print:print"  e i n e  [208]eriode einer periodischen"
  47. 470 print:print"  [211]chwingung."
  48. 480 print:print"  [194]edingung:                              [163][163][163][163][163][163][163][163][163][163]"
  49. 490 print"  [196]ie [193]nzahl der [215]erte muss durch 4"
  50. 500 print"  teilbar sein. [211]ie sollte moeglichst"
  51. 510 print"  '12' oder ein [214]ielfaches betragen."
  52. 520 print"  [196]ie [199]enauigkeit der [193]nalyse steigt"
  53. 530 print"  mit der [193]nzahl der [198]unktionswerte!"
  54. 540 gosub5190
  55. 550 f$="fa-"
  56. 560 ifta$="d"thengosub4790:goto340
  57. 570 ifta$="a"andm1=0then5470
  58. 580 ifta$="a"thengosub4240:z=1:goto790
  59. 590 ifta$<>"t"then450
  60. 600 g=0
  61. 610 printchr$(147):print:print" [199]rad der [193]nalyse ? ";:gosub5910:m2=val(h$)
  62. 620 ifm2<1then610
  63. 630 ifm2/4<>int(m2/4)thenprint:print:print" [218]ahl muss durch 4 teilbar sein!":gosub5100:goto610
  64. 640 ifm2>100then4410
  65. 650 print:print:print" [199]eben [211]ie nun die [217]-[215]erte ein:"
  66. 660 print:print" ([196]er [205]assstab ist so zu waehlen, dass:"
  67. 670 print"     -999 < [198](x) < +999  )":print
  68. 680 m3=m2:k=0:p=0
  69. 690 fori=0tom2-1
  70. 700 ifk=0theny(i)=0
  71. 710 ifp=1then770
  72. 720 print"  y(";i;")alt=";y(i);
  73. 730 print"  neu= ? ";:gosub5910:y(i)=val(h$)
  74. 740 ifabs(y(i))>999thengosub3000:i=i-1:goto770
  75. 750 ifabs(y(i))<1e-3theny(i)=0
  76. 760 ifk=1thenk=0:goto790
  77. 770 next
  78. 780 ifp=1then610
  79. 790 gosub3010
  80. 800 getta$:ifta$="j"then910
  81. 810 ifta$<>"n"then800
  82. 820 z=0:g=0
  83. 830 gosub2990
  84. 840 getta$:ifta$="a"then600
  85. 850 ifta$<>"e"then840
  86. 860 print:print"  [215]elcher [215]ert [217]([201]) soll geaendert"
  87. 870 print"  werden?";:print" [201] = ";:gosub5910:i=val(h$):print
  88. 880 ifi>=m2ori<0thenprint"       [215]ert nicht vorhanden!":goto860
  89. 890 k=1:goto720
  90. 900 yh=-1e+37:yl=1e+37
  91. 910 ifzthenz=0:goto1180
  92. 920 fori=0tom2-1
  93. 930 ify(i)>yhthenyh=y(i)
  94. 940 ify(i)<ylthenyl=y(i)
  95. 950 next
  96. 960 print:print:input"   [198]ilename: ";d1$
  97. 970 iflen(d1$)>13thend1$=left$(d1$,13)
  98. 980 c$=d1$
  99. 990 pi=3.14159:om=2*pi:dt=om/m2:m1=m2/2
  100. 1000 a(0)=0:am=0:b(m1)=0:b(0)=0
  101. 1010 printchr$(147):sp=9:ze=9:gosub5160:print"[197]inen [205]oment bitte..."
  102. 1020 fori=0tom2-1
  103. 1030 a(0)=a(0)+y(i):am=am+y(i)*cos(i*pi)
  104. 1040 next
  105. 1050 a(0)=a(0)/m2:a(m1)=am/m2
  106. 1060 fori=0tom2-1
  107. 1070 x(i)=i*dt
  108. 1080 next
  109. 1090 forn=1tom1-1
  110. 1100 a(n)=0:b(n)=0
  111. 1110 fori=0tom2-1
  112. 1120 a(n)=a(n)+y(i)*cos(x(i)*n)
  113. 1130 b(n)=b(n)+y(i)*sin(x(i)*n)
  114. 1140 next
  115. 1150 a(n)=a(n)/m1:b(n)=b(n)/m1
  116. 1160 next
  117. 1170 v=0:gosub3580:rem   ausdruck?
  118. 1180 printchr$(147)
  119. 1190 print:print"  [193]us den aktuellen [198]untionswerten er-    rechnen sich folgende
  120. 1200 [153]"  (NULL)oeffizienten:"
  121. 1210 t$[178]"analysierten":t1$[178]"atnnalyse: "
  122. 1220 [153]:[153]"  chr$rad der ";t1$;m2:[153]
  123. 1230 t[178]0
  124. 1240 [129]n[178]0[164]m1
  125. 1250 [139][182](a(n))[179][178]1e[171]3[167]a(n)[178]0
  126. 1260 [139][182](b(n))[179][178]1e[171]3[167]b(n)[178]0
  127. 1270 [153]"  a("n")=";
  128. 1280 p[178]a(n):[141]5560:[153]p$;
  129. 1290 [153]"   b("n")=";
  130. 1300 p[178]b(n):[141]5560:[153]p$
  131. 1310 t[178]t[170]1:[139]t[177]11[167][141]5100:t[178]0:[153][199](147):[153]:[153]:[153]:[153]
  132. 1320 [130]
  133. 1330 [139]z[167][142]
  134. 1340 v[178]1:[141]3580:[143]   ausdruck?
  135. 1350 [139]g[178]0[167][141]1460:[137]1370
  136. 1360 [153][199](147)
  137. 1370 [153]:[153]
  138. 1380 [153]"   ascunktion zeichnen?  mid$/(NULL)"
  139. 1390 [151]198,0
  140. 1400 [161]ta$:[139]ta$[178]""[167]1400
  141. 1410 [139]ta$[178]"j"[167][141]1650:[153][199](147):[137]1430
  142. 1420 [139]ta$[179][177]"n"[167][153]"onon":[137]1380
  143. 1430 [153]:[153]:[141]4520:[143]  werte speichern?
  144. 1440 [137]340
  145. 1450 [143]    funktionenplot
  146. 1460 [139]g[167]1650
  147. 1470 [153][199](147):[153]:[153]:[153]:[153]:[153]"          (NULL)lot der ";t$
  148. 1480 [153]:[153]:[153]"               ascunktion in"
  149. 1490 [153]:[153]:[153]"              (NULL)orbereitung"
  150. 1500 [153]:[153]:[153]:[153]"     atnusdrucken der peekildschirmgrafik"
  151. 1510 [153]:[153]"       durch str$ruecken der (NULL)aste 'left$'"
  152. 1520 [153]:[153]"            nach dem (NULL)lotten"
  153. 1530 g[178]1
  154. 1540 om[178]2[172]3.14159:yh[178][171]1e[170]37:yl[178]1e[170]37:k[178]om[173]68
  155. 1550 [129]i1[178]0[164]67
  156. 1560 s[178]a(0)
  157. 1570 [129]i2[178]1[164]m1
  158. 1580 s[178]s[170]a(i2)[172][190](i1[172]i2[172]k)[170]b(i2)[172][191](i1[172]i2[172]k)
  159. 1590 [130]
  160. 1600 y1(i1)[178]s
  161. 1610 [139]y1(i1)[177]yh[167]yh[178]y1(i1)
  162. 1620 [139]y1(i1)[179]yl[167]yl[178]y1(i1)
  163. 1630 [130]
  164. 1640 [142]
  165. 1650 [153][199](142)
  166. 1660 [141]1750:[143]  koordinatenachsen                       zeichnen
  167. 1670 k[178]32[173]yd
  168. 1680 [129]i[178]0[164]67
  169. 1690 [158]pl,i[170]10,43[171]k[172](y1(i)[171]yl)
  170. 1700 [130]
  171. 1710 [141]5690:[143]   hardcopy?
  172. 1720 [139]ta$[179][177]"h"[167][142]
  173. 1730 [137]1650
  174. 1740 [143]    koordinatenachsen zeichnen
  175. 1750 [153][199](147):[153][199](142)
  176. 1760 yd[178]yh[171]yl:[139]yd[179][178]yl[173]10[167]yh[178]yh[172]1.05:yl[178].95[172]yl:[137]1760
  177. 1770 p[178]1:yr[178]yh:[141]5660
  178. 1780 [153]:[153]:[153]:[153]:[153]yr
  179. 1790 yr[178]yd[172]3[173]4[170]yl:[141]5660
  180. 1800 [153]:[153]:[153]:[153]yr
  181. 1810 yr[178]yd[173]2[170]yl:[141]5660
  182. 1820 [153]:[153]:[153]:[153]yr
  183. 1830 yr[178]yd[173]4[170]yl:[141]5660
  184. 1840 [153]:[153]:[153]:[153]yr
  185. 1850 yr[178]yl:[141]5660
  186. 1860 [153]:[153]:[153]:[153]yr
  187. 1870 sp[178]4:ze[178]23:[141]5160:[153]"0"
  188. 1880 sp[178]21:ze[178]23:[141]5160:[153]"(NULL)"
  189. 1890 sp[178]37:ze[178]23:[141]5160:[153]"2(NULL)"
  190. 1900 sp[178]3:ze[178]2:[141]5160:[153]"f(x)
  191. 1910 sp=38:ze=20:gosub5160:print"x"
  192. 1920 sp=13:ze=1:gosub5160:print"funktionenplot";
  193. 1930 sp=13:ze=3:gosub5160:print"name: ";d1$
  194. 1940 fori=7to43
  195. 1950 syspl,10,i
  196. 1960 next:rem  y-achse
  197. 1970 fori=10to78
  198. 1980 syspl,i,43
  199. 1990 next:rem  x-achse
  200. 2000 fori=43to7step-8
  201. 2010 syspl,9,i
  202. 2020 next
  203. 2030 fori=10to78step17
  204. 2040 syspl,i,44
  205. 2050 next
  206. 2060 return
  207. 2070 rem  synthese
  208. 2080 f$="fs-":t$="synthetisierten":t1$="[211]ynthese: "
  209. 2090 printchr$(147):print:print:print"  [196]ieser [208]rogrammteil berechnet und"
  210. 2100 print"  zeichnet  e i n e  [208]eriode einer "
  211. 2110 print"  periodischen [211]chwingung aus den gege-"
  212. 2120 print"  benen [198]ourierkoeffizienten gemaess"
  213. 2130 print"  der [199]esetzmaessigkeit:"
  214. 2140 print:print" [198](x) = [193](0) + [193](1)cos(1x) + [193](2)cos(2x)";
  215. 2150 print"             + ... + [193](n)cos(nx) +"
  216. 2160 print"             + [194](1)sin(1x) + [194](2)sin(2x)";
  217. 2170 print"             + ... + [194](n)sin(nx)"
  218. 2180 print:print"      mit  x = omega * t"
  219. 2190 print"   und einer [213]nterteilung einer vollen"
  220. 2200 print"   [208]eriode in 68 [197]inzelschritte."
  221. 2210 gosub5190
  222. 2220 ifta$="d"theng=1:gosub4780:goto340
  223. 2230 ifta$="a"andm1=0then5470
  224. 2240 ifta$="a"theng=1:printchr$(147):goto2680
  225. 2250 ifta$<>"t"then2090
  226. 2260 g=0
  227. 2270 printchr$(147):print:print:print:print"  (= die hoechste vorkommende"
  228. 2280 print"     [200]armonische [207]berwelle)"
  229. 2290 printchr$(19):print:print" [199]rad der [211]ynthese ? : ";:gosub5910:m1=val(h$)
  230. 2295 ifm1<1then2270
  231. 2300 ifm1>100then4410
  232. 2310 print:print:print:print:print"[199]eben [211]ie nun die [203]oeffizienten ein:"
  233. 2320 print:print" [[196]er [205]assstab ist so zu waehlen, dass:"
  234. 2330 print"  [193](0) + [193](1) + ... + [193](n)  < 700  und"
  235. 2340 print"  [193](0) + [194](1) + ... + [194](n)  < 700 ! ]":print
  236. 2350 a(0)=0:b(0)=0:a=0:b=0:m2=68:m3=m1:k=0:p=0
  237. 2360 fori=0tom1
  238. 2370 ifk=0thena(i)=0:b(i)=0
  239. 2380 ifp=1then2430
  240. 2390 print"  [193](";i;")? ";:gosub5910
  241. 2395 a(i)=val(h$):a=a+a(i):ifa>700thengosub3000:goto2430
  242. 2400 ifi=0then2420
  243. 2410 printtab(20)"[145][194](";i;")? ";:gosub5910
  244. 2415 b(i)=val(h$):b=b+b(i):ifb>700thengosub3000:goto2430
  245. 2420 ifk=1thenk=0:goto2450
  246. 2430 next
  247. 2440 ifp=1then2260
  248. 2450 gosub3010
  249. 2460 getta$:ifta$="j"then2610
  250. 2470 ifta$<>"n"then2460
  251. 2480 gosub2990
  252. 2490 getta$:ifta$="a"then2260
  253. 2500 ifta$<>"e"then2490
  254. 2510 print"  [215]elche [215]erte [193]([201]) und [194]([201]) sollen"
  255. 2520 print"  geaendert werden?";:print" [201] = ";:gosub5910:i=val(h$)
  256. 2530 ifi>m1ori<0thenprint"       [215]ert nicht vorhanden!":goto2510
  257. 2540 a=a-a(i):b=b-b(i)
  258. 2550 print:print"   [193]lte [215]erte:"
  259. 2560 print"  [193](";i;")";a(i);
  260. 2570 ifi=0then2590
  261. 2580 printtab(20)"[194](";i;")";b(i)
  262. 2590 print:print"   [206]eue [215]erte:"
  263. 2600 k=1:goto2390
  264. 2610 print:print:input"  [198]ilename: ";d1$
  265. 2620 iflen(d1$)>13thend1$=left$(d1$,13)
  266. 2630 c$=d1$
  267. 2640 gosub1460:printchr$(147)
  268. 2650 fori=0to67
  269. 2660 y(i)=y1(i)
  270. 2670 next
  271. 2680 print:print:print
  272. 2690 print" [211]oll die [198]unktion gezeichnet            werden?  [202]/[206]"
  273. 2700 poke198,0
  274. 2710 getta$:ifta$="n"then2740
  275. 2720 ifta$<>"j"then2710
  276. 2730 gosub1650
  277. 2740 printchr$(147):print:print:print
  278. 2750 print"  [211]ollen die synthetisierten [198]unktions-"
  279. 2760 print"  werte ausgegeben werden?  [202]/[206]"
  280. 2770 getta$:ifta$="n"then2830
  281. 2780 ifta$<>"j"then2770
  282. 2790 printchr$(147):print:print"  [208]rogrammname: ";d1$
  283. 2800 print:print"  [199]rad der [211]ynthese: ";m1
  284. 2810 gosub4260
  285. 2820 printchr$(147)
  286. 2830 print:print:print:print"  [211]ollen die aktuellen [203]oeffizienten"
  287. 2840 print"  ausgegeben werden?  [202]/[206]"
  288. 2850 getta$:ifta$="n"then2920
  289. 2860 ifta$<>"j"then2850
  290. 2870 printchr$(147):print:print:print"  [211]ynthese aus den aktuellen              [203]oeffizienten:"
  291. 2880 print:print"  [199]rad der [211]ynthese: ";m1
  292. 2890 print
  293. 2900 z=1:gosub1230:z=0:v=1:w=1:gosub3580:v=0:w=0:gosub5100
  294. 2910 printchr$(147)
  295. 2920 print:print:print:print:gosub4520
  296. 2930 print:print:print:print"  [211]ollen aktuelle [203]oeffizienten"
  297. 2940 print"  geaendert werden?  [202]/[206]":print
  298. 2950 poke198,0
  299. 2960 getta$:ifta$="n"then340
  300. 2970 ifta$<>"j"then2960
  301. 2980 m2=68:g=0:goto2510
  302. 2990 print:print"  [193][146]lle oder [197][146]inzelne [215]erte?":print:return
  303. 3000 print:print"      [194]itte [205]assstab verkleinern !":print:gosub5100:p=1:return
  304. 3010 print:print"  [193]lle [215]erte in [207]rdnung? [202]/[206]":return
  305. 3020 rem   frequenzspektrum zeigen
  306. 3030 ifm1=0then5470:rem keine werte vorhanden
  307. 3040 ma=0
  308. 3050 forn=0tom1
  309. 3060 aa(n)=abs(a(n)):ab(n)=abs(b(n))
  310. 3070 ifaa(n)>mathenma=aa(n)
  311. 3080 ifab(n)>mathenma=ab(n)
  312. 3090 next
  313. 3100 m4=m1:m5=0
  314. 3110 if(m4/10)<>int(m4/10)thenm4=m4+1:goto3110
  315. 3120 printchr$(142)
  316. 3130 fort=0tom4-1step10
  317. 3140 m5=m5+1
  318. 3150 printchr$(147):rem  spektrum z.
  319. 3160 p=1:yr=ma:gosub5660
  320. 3170 print:print:print:print:printyr
  321. 3180 yr=ma*3/4:gosub5660
  322. 3190 print:print:print:printyr
  323. 3200 yr=ma/2:gosub5660
  324. 3210 print:print:print:printyr
  325. 3220 yr=ma/4:gosub5660
  326. 3230 print:print:print:printyr
  327. 3240 print:print:print:print"  0"
  328. 3250 sp=1:ze=1:gosub5160:print"frequenzspektrum"
  329. 3260 sp=22:ze=1:gosub5160:print"name:";d1$
  330. 3270 sp=8:ze=3:gosub5160:print"abs(a) = durchgezeichnet"
  331. 3280 sp=8:ze=4:gosub5160:print"abs(b) = gestrichelt"
  332. 3290 sp=1:ze=3:gosub5160:print"ampl"
  333. 3300 sp=22:ze=2:gosub5160:print"bild";m5;"von";m4/10
  334. 3310 sp=35:ze=21:gosub5160:print"harm"
  335. 3320 fori=7to43
  336. 3330 syspl,10,i
  337. 3340 next:rem  y-achse
  338. 3350 fori=10to69
  339. 3360 syspl,i,43
  340. 3370 next:rem  x=achse
  341. 3380 fori=43to7step-8
  342. 3390 syspl,9,i
  343. 3400 next
  344. 3410 fori=12to70step6
  345. 3420 forj=0to2
  346. 3430 syspl,i+j,44
  347. 3440 next:next
  348. 3450 fori=0to9
  349. 3460 ze=23:sp=5+3*i:gosub5160
  350. 3470 gosub5160:printt+i
  351. 3480 forl=43-32*(aa(t+i)/ma)to43
  352. 3490 syspl,12+6*i,l
  353. 3500 nextl
  354. 3510 forl=43-32*(ab(t+i)/ma)to43step2
  355. 3520 syspl,14+6*i,l
  356. 3530 nextl:nexti
  357. 3540 gosub5690:rem hardcopy'?
  358. 3550 nextt:printchr$(14)
  359. 3560 goto340
  360. 3570 rem   druckausgabe?
  361. 3580 print:print:print:print"  [211]ollen die [215]erte ausgedruckt"
  362. 3590 print"  werden?  [202]/[206]"
  363. 3600 poke198,0
  364. 3610 getta$:ifta$="j"then3650
  365. 3620 ifta$<>"n"then3610
  366. 3630 return
  367. 3640 rem   ausdruck
  368. 3650 gosub5440
  369. 3660 ifst<>-128then3690
  370. 3670 printchr$(147):sp=10:ze=10:gosub5160
  371. 3680 print"[196]rucker einschalten!":gosub5100:printchr$(147):goto3580
  372. 3690 open4,4,7
  373. 3700 ifvthen3810
  374. 3710 print#4
  375. 3720 print#4,"       [198]unktionswerte des [208]rogrammes: ";d1$:print#4
  376. 3730 fori=0tom2-1step2
  377. 3740 print#4,tab(10)"[217](";i;") = ";
  378. 3750 p=y(i):gosub5560:print#4,p$;
  379. 3760 print#4,tab(10)"y(";i+1;") = ";
  380. 3770 p=y(i+1):gosub5560:print#4,p$
  381. 3780 next
  382. 3790 print#4:close4
  383. 3800 return
  384. 3810 print#4:m3=m2:l=0
  385. 3820 print#4,"       [196]ie [198]unktion kann mittels folgender [203]oeffizienten";
  386. 3830 print#4," dargestellt werden:"
  387. 3840 print#4,"       [199]rad der "t1$;m3
  388. 3850 print#4
  389. 3860 fori=0tom1
  390. 3870 print#4,tab(10)"a(";i;") = ";
  391. 3880 p=a(i):gosub5560:print#4,p$;
  392. 3890 ifp<>0thenl=12
  393. 3900 print#4,tab(10)"b(";i;") = ";
  394. 3910 p=b(i):gosub5560:print#4,p$
  395. 3920 next:ifwthen4230
  396. 3930 print#4:print#4,"       [215]obei gilt:"
  397. 3940 print#4
  398. 3950 print#4,"       [198](x) = [193](0) + [193](1)cos(1x) + [193](2)cos(2x) + [193](3)cos(3x) + ...
  399. 3960 [152]4,"                   + peek(1)sin(1x) + peek(2)sin(2x) + peek(3)sin(3x) + ...
  400. 3970 print#4:print#4,"              mit  x = omega * t  (und omega = 2*pi*f)"
  401. 3980 iff$="fs-"then4230
  402. 3990 print#4,"       [198]uer die aktuelle [198]unktion ergibt sich ";
  403. 4000 print#4,"hiernach folgende [193]nalyse:":print#4
  404. 4010 p=3:yr=a(0):gosub5660
  405. 4020 print#4,"       [198](x)=";yr;"+"
  406. 4030 ifl=0then4130
  407. 4040 t=0
  408. 4050 fori=1tom3
  409. 4060 ifa(i)=0then4120
  410. 4070 ifa(i)<0thenz$="":goto4090
  411. 4080 z$="+"
  412. 4090 yr=a(i):gosub5660
  413. 4100 print#4,spc(l)z$;yr"cos("i"x)";
  414. 4110 l=0:t=t+1:ift=3thenl=12:t=0:print#4
  415. 4120 next
  416. 4130 print#4
  417. 4140 l=12:t=0
  418. 4150 fori=1tom3
  419. 4160 ifb(i)=0then4220
  420. 4170 ifb(i)<0thenz$="":goto4190
  421. 4180 z$="+"
  422. 4190 yr=b(i):gosub5660
  423. 4200 print#4,spc(l)z$;yr"sin("i"x)";
  424. 4210 l=0:t=t+1:ift=3thenl=12:t=0:print#4
  425. 4220 next
  426. 4230 print#4:close4:return
  427. 4240 printchr$(147):print:print"  [208]rogrammname: ";d1$
  428. 4250 print:print"  [199]rad der [193]nalyse: ";m2
  429. 4260 print:print"  [193]ktuelle [198]unktionswerte:":print
  430. 4270 fori=0tom2-1
  431. 4280 ifabs(y(i))<=1e-3theny(i)=0
  432. 4290 next
  433. 4300 t=0
  434. 4310 fori=0tom2-1step2
  435. 4320 print"  y(";i;")=";
  436. 4330 p=y(i):gosub5560:printp$;
  437. 4340 print"   y(";i+1;")=";
  438. 4350 p=y(i+1):gosub5560:printp$
  439. 4360 t=t+1
  440. 4370 ift>11thengosub5100:t=0:printchr$(147):print:print:print:print
  441. 4380 next
  442. 4390 v=0:gosub3570:rem   ausdruck?
  443. 4400 return
  444. 4410 printchr$(147):print:print:print"  [214]ariablenfeld zu klein dimensioniert!"
  445. 4420 print"  [194]itte neu festlegen und in [218]eile 10     eintragen. [197]s bedeutet:"
  446. 4430 print"   y = [193]nzahl der einzugebenden"
  447. 4440 print"       [198]unktionswerte."
  448. 4450 print:print"   a = b = y;  x = y/2
  449. 4460 [153]:[153]:[153]
  450. 4470 [153]"  atnusserdem ist die atnbfrage ueber die"
  451. 4480 [153]"  maximale (NULL)erteanzahl (m1 bzw. m2) in"
  452. 4490 [153]"  den (NULL)eilen 640 und 2300 neu anzu-       passen!"
  453. 4495 [153]:[153]:[153]:[153][199](9):[128]
  454. 4500 [143]   werte speichern
  455. 4510 [153][199](145)[199](145);
  456. 4520 [153]"  (NULL)ollen die (NULL)erte abgespeichertwait"
  457. 4530 [153]"  werden?  mid$/(NULL)"
  458. 4540 [151]198,0
  459. 4550 [161]ta$:[139]ta$[178]"j"[167]4580
  460. 4560 [139]ta$[179][177]"n"[167]4550
  461. 4570 [142]
  462. 4580 [153][199](147):[153]:[153]"   ascilename ";c$
  463. 4590 [141]5360
  464. 4600 [139]st[179][177][171]128[175]st[179][177][171]125[167]4620
  465. 4610 sp[178]11:ze[178]10:[141]5160:[153]"ascloppy einschalten!":[141]5100:[137]4580
  466. 4620 d$[178]f$[170]c$
  467. 4630 [159]4,8,1,d$
  468. 4640 [153]:[153]"  ascunktionswerte und (NULL)oeffizienten        werden gespeichert"
  469. 4650 [152]4,m2:[152]4,m1:[152]4,yh:[152]4,yl:[152]4,g
  470. 4660 [129]i[178]0[164]m2[171]1
  471. 4670 [152]4,y(i)
  472. 4680 [130]
  473. 4690 [129]i[178]0[164]67
  474. 4700 [152]4,y1(i)
  475. 4710 [130]
  476. 4720 [129]i[178]0[164]m1
  477. 4730 [152]4,a(i):[152]4,b(i)
  478. 4740 [130]
  479. 4750 [160]4
  480. 4760 [139]st[179][177]0[167][141]5390
  481. 4770 [142]
  482. 4780 [143]   werte laden?
  483. 4790 [153][199](145)[199](145)"                          "
  484. 4800 [153]"  (NULL)ollen die (NULL)erte geladen"
  485. 4810 [153]"  werden?  mid$/(NULL)              "
  486. 4820 [151]198,0
  487. 4830 [161]ta$:[139]ta$[178]"j"[167]4860
  488. 4840 [139]ta$[179][177]"n"[167]4830
  489. 4850 [142]
  490. 4860 [153][199](147):[153]:[153]:[133]"   ascilename ((NULL)=(NULL)val(NULL)(NULL)(NULL)(NULL))";d1$
  491. 4870 [139]d1$[178]"r"[167][142]
  492. 4880 [139][195](d1$)[177]13[167]d1$[178][200](d1$,13)
  493. 4890 c$[178]d1$
  494. 4900 d$[178]f$[170]c$
  495. 4910 [141]5360
  496. 4920 [139]st[179][177][171]128[175]st[179][177][171]125[167]4940
  497. 4930 sp[178]11:ze[178]10:[141]5160:[153]"ascloppy einschalten!":[141]5100:[137]4860
  498. 4940 [159]4,8,0,d$:[160]4:[159]15,8,15:[132]15,a,b$,c,d:[160]15
  499. 4945 [139]b$[179][177]"ok"[167][141]5410:[137]4860
  500. 4947 [159]4,8,0,d$
  501. 4950 [153]:[153]:[153]"  ascunktionswerte und (NULL)oeffizienten        werden geladen"
  502. 4960 [132]4,m2:[132]4,m1:[132]4,yh:[132]4,yl:[132]4,g
  503. 4970 [129]i[178]0[164]m2[171]1
  504. 4980 [132]4,y(i)
  505. 4990 [130]
  506. 5000 [129]i[178]0[164]67
  507. 5010 [132]4,y1(i)
  508. 5020 [130]
  509. 5030 [129]i[178]0[164]m1
  510. 5040 [132]4,a(i):[132]4,b(i)
  511. 5050 [130]
  512. 5060 [160]4
  513. 5070 [139]st[179][177]64[167][141]5390
  514. 5080 [142]
  515. 5090 :[143]  auf tastendruck warten
  516. 5100 sp[178]17:ze[178]23
  517. 5110 [151]211,sp:[151]214,ze:[158]58640
  518. 5120 [153]"(NULL)astewait"
  519. 5130 [151]198,0:[146]198,1:[153][199](147)
  520. 5140 [142]
  521. 5150 :[143]  cursor setzen
  522. 5160 [151]211,sp:[151]214,ze:[158]58640
  523. 5170 [142]
  524. 5180 :[143] eingabemodus
  525. 5190 [153]:[153]"  valrfolgt die valingabe der einzelnen"
  526. 5200 [153]"  ascunktionswerte durch"
  527. 5210 [153]:[153]"        str$waitatenspeicher"
  528. 5220 [153]"        (NULL)waitastatur"
  529. 5230 [133]"        atnwaitktuelle (NULL)erte ";ta$
  530. 5240 [142]
  531. 5250 :[143] directory
  532. 5260 [141]5360
  533. 5270 [139]st[179][177][171]128[167]5300
  534. 5280 [153][199](147):sp[178]11:ze[178]10:[141]5160
  535. 5290 [153]"ascloppy einschalten!":[141]5100:[137]340
  536. 5300 [153][199](147):[159]1,8,0,"$":[151]781,1:[158]65478:[161]a$,a$:e$[178][199](0)
  537. 5310 [161]a$,a$,h$,l$:[139]st[167][158]65484:[160]1:[153]:[141]5100:[137]340
  538. 5320 [153][198](h$[170]e$)[170]256[172][198](l$[170]e$);
  539. 5330 [161]a$,b$:[139]a$[167][153]a$b$;:[137]5330
  540. 5340 [153]a$:[137]5310
  541. 5350 :[143]  floppy eingeschaltet?
  542. 5360 c[178][194](768):[151]768,185
  543. 5370 [159]1,8,15,"i":[160]1:[151]768,c:[142]
  544. 5380 :[143] fehler laden/speichern
  545. 5390 [159]15,8,15
  546. 5400 [132]15,a,b$,c,d
  547. 5410 [153]"       ";a;b$;c;d:[153]:[153]
  548. 5420 [160]15:[137]5100
  549. 5430 :[143]  drucker eingeschaltet?
  550. 5440 c[178][194](768):[159]1,4:[151]768,185
  551. 5450 [152]1:[160]1:[151]768,c:[142]
  552. 5460 :[143] aktuelle werte vorhanden?
  553. 5470 [153][199](147):[153]
  554. 5480 [153]"    (NULL)eine aktuellen (NULL)erte vorhanden!":[153]:[141]5100:[137]340
  555. 5490 :[143]  pgm-ende?
  556. 5500 [153]"on         (NULL)ind (NULL)ie sicher?  mid$/(NULL)wait";
  557. 5510 [151]198,0
  558. 5520 [161]ta$:[139]ta$[178]"n"[167]80
  559. 5530 [139]ta$[179][177]"j"[167]5520
  560. 5540 [153][199](9):[128]
  561. 5550 :[143]  print using
  562. 5560 p1$[178]"+"
  563. 5570 [139][180](p)[179]0[167]p1$[178]"-"
  564. 5580 p$[178][196](1000.0005[170][182](p))
  565. 5590 p$[178][200](p$,9)
  566. 5600 p$[178][201](p$,7)
  567. 5610 [139][200](p$,2)[178]"00"[167]p$[178]"  "[170][201](p$,5)
  568. 5620 [139][200](p$,1)[178]"0"[167]p$[178]" "[170][201](p$,6)
  569. 5630 p$[178]p1$[170]p$
  570. 5640 [142]
  571. 5650 : [143]  aufrunden
  572. 5660 yr[178][181]((yr[170].0005)[172]10[174]p)[173]10[174]p
  573. 5670 [142]
  574. 5680 :[143] hardcopy ?
  575. 5690 [153][199](142)
  576. 5700 sp[178]10:ze[178]24:[141]5160:[153]"tastewait   (h=hardcopy)";
  577. 5710 [151]198,0:[146]198,1:[161]ta$
  578. 5720 [139]ta$[178]"h"[167]5740
  579. 5730 [153][199](14):[142]
  580. 5740 [141]5440:[139]st[179][177][171]128[167]5760
  581. 5750 [141]5160:[153]"drucker einschalten!wait";:[137]5710
  582. 5760 [141]5160:[153]"                       ";
  583. 5770 [141]5820:[143] hardcopyroutine
  584. 5780 [137]5700
  585. 5790 :
  586. 5800 :[143] hardcopy-beginn
  587. 5810 :
  588. 5820 [158]hc:[143] hc-beginn bei $c0c0
  589. 5830 [142]
  590. 5835 :
  591. 5840 d$[178]"fou-beschr":[141]5360:[139]st[179][177][171]128[167]5860
  592. 5850 [153][199](147):sp[178]11:ze[178]10:[141]5160:[153]"ascloppy einschalten!":[141]5100:[137]340
  593. 5860 [159]4,8,0,d$:[160]4:[159]15,8,15:[132]15,a,b$,c,d:[160]15
  594. 5870 [139]b$[179][177]"ok"[167][153][199](147):[141]5410:[137]340
  595. 5880 [153][199](147)"(NULL)urzbeschreibung wird geladen..."
  596. 5885 [151]2,[194](646)[170]1:[151]646,[194](e[170]1)
  597. 5890 [153]"load"[199](34)"fou-beschr"[199](34)",8":[153]"run"[199](19)
  598. 5895 [151]631,13:[151]632,13:[151]633,13:[151]198,3:[162]
  599. 5899 :
  600. 5900 :[143] zahlenwerteingabe
  601. 5910 h$[178]"":[151]198,0
  602. 5920 [161]e$:[139]e$[178]""[167]5920
  603. 5930 [139]e$[178]"+"[176]e$[178]"-"[175]h$[178]""[167]5980
  604. 5940 [139]e$[178]"."[167]5980
  605. 5950 [139]e$[178][199](13)[175]h$[179][177]""[167][153]:[142]
  606. 5960 [139]e$[178][199](20)[175]h$[179][177]""[167][153][199](20);:h$[178][200](h$,[195](h$)[171]1):[137]5920
  607. 5970 [139][198](e$)[179]48[176][198](e$)[177]57[167]5920
  608. 5980 h$[178]h$[170]e$:[153]e$;:[137]5920
  609. 5990 :
  610. 6000 :[143] masch-pgm.fuer plot und hc
  611. 6010 [131]169,0,72,32,253,174,32,158,183,138,24,74,133,211,144,4,104,9,1,72,32
  612. 6020 [131]253,174,32,158,183,138,24,74,133,214,144,5,104,9,16,72,24,32,16,229
  613. 6030 [131]166,214,181,217,41,127,133,210,189,240,236,133,209,164,211,177,209
  614. 6040 [131]162,16,202,48,42,221,110,192,208,248,104,201,0,208,6,189,126,192,76
  615. 6050 [131]102,192,201,1,208,6,189,142,192,76,102,192,201,16,208,6,189,158,192
  616. 6060 [131]76,102,192,189,174,192,145,209,96,162,14,76,68,192,123,126,124,108
  617. 6070 [131]97,225,98,226,236,251,254,252,127,255,32,160,97,126,226,127,97,251
  618. 6080 [131]252,226,236,251,160,252,127,236,126,160,255,226,124,225,236,225,254
  619. 6090 [131]226,236,251,254,160,251,255,124,160,123,97,255,98,97,254,98,236,236
  620. 6100 [131]160,254,252,252,255,123,160,98,127,225,108,252,225,98,251,160,251,254
  621. 6110 [131]252,127,254,108,160,0,0,169,4,133,186,168,169,126,133,184,169,0,133
  622. 6120 [131]113,132,114,133,183,133,185,32,192,255,166,184,32,201,255,162,25,169
  623. 6130 [131]13,32,210,255,32,225,255,240,66,160,0,177,113,133,103,133,139,16,7
  624. 6140 [131]169,18,32,210,255,165,103,41,63,6,103,36,103,16,2,9,128,112,2,9,64
  625. 6150 [131]32,210,255,165,139,16,5,169,146,32,210,255,200,192,40,208,210,152,24
  626. 6160 [131]101,113,133,113,144,2,230,114,202,208,185,169,13,32,210,255,32,204
  627. 6170 [131]255,169,126,76,195,255
  628.