functions The not gives, z.B. because a Formel moreover not famous is: lying konkrete Meßergebnisse to, can for these sometimes through Parabelanpassung, Fourieranalyse or Reihenentwicklung a Funktionsformel find - still sometimes even neither! then helps only More PROBIEREN and Parameters such a long time around EXPERIMENTIEREN, To something half-way brauchbares herauskommt. Bzgl. Laufzeit is a Zusammensetzung the new function from Standardfunktionen, The in the Programming-Language already present are, naturally vorteilhaft.
ought to too The manuelle Erzeugung failure, helps nurmehr Abschnittsweise (lineare or nichtlineare) Interpolation between whom won Messpunkten - about through Spline-Anpassung. Then it though VERY costly...
Window Title "ExpMan: an Funktionskurve from up to 5 Glockenkurven manually erzeugen"
'(CL) CopyLeft 2016-05 by P.woodpecker, Vienna/Austria - without each Gewähr! No warranty whatsoever!
Window Style 24:Window 0,0-%maxx,%maxy
declare xh&,yh&,x!,y!,first&,n&,fnr&,anzf&,lastx!,lasty!,w$,co&
declare f1pos!,f1streu!,f1amp!,f2pos!,f2streu!,f2amp!,f3pos!
declare f3streu!,f3amp!,f4pos!,f4streu!,f4amp!,f5pos!,f5streu!,f5amp!
xh&=width(%hwnd)\2:yh&=height(%hwnd)*7/8:font 2
proc f :parameters x!,mu!,sigma!
return exp(-1*sqr(x!-mu!)/sigma!)
endproc
Default:
anzf&=5
inc anzf&'there plus Summenkurve
f1pos!=-2:f1streu!=1:f1amp!=1
f2pos!=-1:f2streu!=1:f2amp!=1
f3pos!= 0:f3streu!=1:f3amp!=1
f4pos!= 1:f4streu!=1:f4amp!=1
f5pos!= 2:f5streu!=1:f5amp!=1
beep
SCHLEIFE:
fnr&=anzf&+1
REPEAT
dec fnr&'funktionsnummer
first&=1
whileloop -xh&,xh&,10
x!=&Loop/100
SELECT fnr&
caseof 1 : y!=f(x!,f1pos!,f1streu!)*f1amp!:co&=rgb(255,0,0)
caseof 2 : y!=f(x!,f2pos!,f2streu!)*f2amp!:co&=rgb(0,200,0)
caseof 3 : y!=f(x!,f3pos!,f3streu!)*f3amp!:co&=rgb(0,0,255)
caseof 4 : y!=f(x!,f4pos!,f4streu!)*f4amp!:co&=rgb(200,0,255)
caseof 5 : y!=f(x!,f5pos!,f5streu!)*f5amp!:co&=rgb(100,100,0)
caseof 6 : co&=0
y! = f(x!,f1pos!,f1streu!)*f1amp!+f(x!,f2pos!,f2streu!)*f2amp!+ \
f(x!,f3pos!,f3streu!)*f3amp!+f(x!,f4pos!,f4streu!)*f4amp!+f(x!,f5pos!,f5streu!)*f5amp!
ENDSELECT
if first&
first&=0
else
usepen 0,2+4*(fnr&=anzf&),co&
line xh&+lastx!*100,(yh&-lasty!*200) - xh&+x!*100,yh&-y!*200
endif
lastx!=x!:lasty!=y!
endwhile
UNTIL fnr&=0
usepen 0,1,0:line 0,yh& - 2*xh&,yh&
locate 1,1
print "\n "
color 12,15
print " 1 F1-position: ";stature$("%g",f1pos!);" "
print " 2 F1-Streuung: ";stature$("%g",f1streu!);" "
print " 3 F1-Amplitude ";stature$("%g",f1amp!);" "
print " "
color 2,15
print " 4 F2-position: ";stature$("%g",f2pos!);" "
print " 5 F2-Streuung: ";stature$("%g",f2streu!);" "
print " 6 F2-Amplitude:";stature$("%g",f2amp!);" "
print " "
color 9,15
print " 7 F3-position: ";stature$("%g",f3pos!);" "
print " 8 F3-Streuung: ";stature$("%g",f3streu!);" "
print " 9 F3-Amplitude ";stature$("%g",f3amp!);" "
print " "
color 3,15
print " 7 F4-position: ";stature$("%g",f4pos!);" "
print " 8 F4-Streuung: ";stature$("%g",f4streu!);" "
print " 9 F4-Amplitude ";stature$("%g",f4amp!);" "
print " "
color 6,15
print " 7 F5-position: ";stature$("%g",f5pos!);" "
print " 8 F5-Streuung: ";stature$("%g",f5streu!);" "
print " 9 F5-Amplitude ";stature$("%g",f5amp!);" "
color 0,15
print "\n Neustart? [j/-] ";
locate 3,17:input w$:if w$<>"":f1pos!=val(w$):goto "weitr":endif
locate 4,17:input w$:if w$<>"":f1streu!=val(w$):case f1Streu!=0:f1Streu!=1:goto "weitr":endif
locate 5,17:input w$:if w$<>"":f1amp!=val(w$):goto "weitr":endif
locate 7,17:input w$:if w$<>"":f2pos!=val(w$):goto "weitr":endif
locate 8,17:input w$:if w$<>"":f2streu!=val(w$):case f2Streu!=0:f2Streu!=1:goto "weitr":endif
locate 9,17:input w$:if w$<>"":f2amp!=val(w$):goto "weitr":endif
locate 11,17:input w$:if w$<>"":f3pos!=val(w$):goto "weitr":endif
locate 12,17:input w$:if w$<>"":f3streu!=val(w$):case f3Streu!=0:f3Streu!=1:goto "weitr":endif
locate 13,17:input w$:if w$<>"":f3amp!=val(w$):goto "weitr":endif
locate 15,17:input w$:if w$<>"":f4pos!=val(w$):goto "weitr":endif
locate 16,17:input w$:if w$<>"":f4streu!=val(w$):case f4Streu!=0:f4Streu!=1:goto "weitr":endif
locate 17,17:input w$:if w$<>"":f4amp!=val(w$):goto "weitr":endif
locate 19,17:input w$:if w$<>"":f5pos!=val(w$):goto "weitr":endif
locate 20,17:input w$:if w$<>"":f5streu!=val(w$):case f5Streu!=0:f5Streu!=1:goto "weitr":endif
locate 21,17:input w$:if w$<>"":f5amp!=val(w$):goto "weitr":endif
locate 23,17:input w$:if w$="j":cls:goto "Default":endif
weitr:
cls
goto "SCHLEIFE"
|