English
Source / code snippets

Interpolation by more discreetly Fourier-analysis & -Synthese

 

p.specht

Fourier-Interpolation: Bekanntlich can mathematical functions through klassischer Fourier-Zerlegung spektral-analyse, speak: Analytisch in reason- and Oberwellenanteile decompose. sometimes has one but too only a simple scheduler (z.B. Meßergebnisse) with of/ one geraden (!) amount of Stützwerten in equal (!) intervals available. Faßt one these as itself regularly wiederholenden Wellenzug on, is 'Diskrete Fourieranalyse' angesagt, also under Bezeichnung 'Harmonische Analyse' famous is.

the works too inverse: If one The ursprüngliche function again from the Wellensalat rekonstruiert, speaks one of 'Fourier-Synthese'. benefit the again zusammengesetzten function: she's kontinuierlich, d.h. it can also arbitrary Zwischenwerte between whom Stützwerten determined go, what maths-Freaks with the concept Interpolation bezeichnen.

details: but not of/ one Tabelleneingabe watts in the nachstehenden example a Formel to investigation the Stützwerte uses. but the can naturally anytime Change, as long as one The x_i-values of 0 To 2*Pi walk can. The must one erforderlichenfalls hold there hintransformieren.

to employment this Verfahrens ought to one short above cogitate, whether whom individual Frequencies in the 'richtigen Leben' objectively a weight comes up to, - whether means defined causes the unterschiedlichern Frequencies for the Result Responsible his could - otherwise there namely explicit einfachere types the Interpolation...
'The Umsetzung in XProfan is a pure DEMO solely for private tack!
Window Title "Trigonometrische Interpolation             terminate with x = -1"
' Angelehnt on "B.Brand: Algorithms to virtually Mathematik", Oldenbourg Vlg.1981, s.78
' Algorithmus portiert to XProfan-11 in 2014-09 by P.woodpecker, Wien; without jedwede Gewähr!
Window Style 24:randomize:set("decimals",18):Window %maxx/4,0-%maxx/2,%maxy-40
var xh&=width(%hwnd)/2:var yh&=height(%hwnd)/2 :   Var m&=16' <<<<<<<<<<<<<<<<<<<<<<<<<<<
declare i&,j&,k&,a![2*m&],b![2*m&],f!,x![2*m&],y![2*m&],x!,p!
print mkstr$("-",64)+"\n i            X[i]                 F=Y(x[i])\n"+mkstr$("-",64)

whileloop 0,2*m&:i&=&Loop:x![i&]=Pi()*i&/m& : y![i&]=cos(x![i&]+x![i&]*2)' <<<<<<<<<<<<<<<<

    casenot i& mod (1+m&\16):print if(i&>9,""," ");i&,tab(6);x![i&],tab(30);if(y![i&]<0,""," ");y![i&]
    endwhile :print mkstr$("-",64)

    whileloop 2*m&:i&=&Loop : a![0]=a![0]+y![i&]:a![i&]=a![i&]+y![i&]*(1-2*(i& mod 2))

        endwhile :a![0]=a![0]/m&/2:a![m&]=a![m&]/m&/2:print " a[ 0] = ";if(a![0]<0,""," ");a![0]

        whileloop m&-1:k&=&Loop

            whileloop 2*m&:i&=&Loop

                a![k&]=a![k&]+y![i&]*cos(k&*x![i&]) : b![k&]=b![k&]+y![i&]*sin(k&*x![i&])
                endwhile : a![k&]=a![k&]/m& : b![k&]=b![k&]/m&
                print " a[";if(k&<=9," ","");k&;"] = ";if(a![k&]<0,""," ");a![k&];\
                tab(33);"  b[";if(k&<=9," ","");k&;"] = ";if(b![k&]<0,""," ");b![k&]
                endwhile :print " a[";if(m&<=9," ","");m&;"] = ";if(a![m&]<0,""," ");a![m&];\
                tab(33);"  b[";if(m&<=9," ","");m&;"] = ";if(b![m&]<0,""," ");b![m&]
                print mkstr$("-",64)+"\n              x                      P(x)\n"+mkstr$("-",64)
                repeat :f!=0:print " x = ";:input x!:case x!= -1:end

                whileloop m&-1:k&=&Loop : f!=f!+(a![k&]*cos(k&*x!)+b![k&]*sin(k&*x!))

                    endwhile : p!=f!+a![0]+a![m&]*cos(m&*x!):locate %csrlin-1,1:
                    print "    ";if(x!<0,""," ");x!,tab(29);if(p!<0,""," ");p!

                until %key=27:end

 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/15/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.451 Views

Untitledvor 0 min.
Rschnett08/06/22
p.specht11/21/21
R.Schneider11/20/21
Uwe Lang11/20/21
More...

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie