本帖最后由 西风烈 于 2018-11-10 21:52 编辑
现在有一个二维数,图像如图所示。
现在想得到这一堆离散数据的傅里叶级数表示。
我傅里叶变换这一块学得不好,没弄明白。
想知道,是否要截取一个周期的数据之后,形成一个完整的周期之后,然后对其进行延拓,之后再求傅里叶级数吗?
有没有哪位大神帮忙,写一个简单的代码。
不胜感激。
复制代码x = [35 34 33 32 31 30 29 28 27 26 25.8000000000000 25.6000000000000 25.4000000000000 25.2000000000000 25 24.8000000000000 24.6000000000000 24.4000000000000 24.2000000000000 24 23.8000000000000 23.6000000000000 23.4000000000000 23.2000000000000 23 22 21 20 19 18 17 16 15 14 13.8000000000000 13.6000000000000 13.4000000000000 13.2000000000000 13 12.8000000000000 12.6000000000000 12.4000000000000 12.2000000000000 12 11.8000000000000 11.6000000000000 11.4000000000000 11.2000000000000 11 10 9 8 7 6 5 4 3 2 1.80000000000000 1.60000000000000 1.40000000000000 1.20000000000000 1 0.800000000000000 0.600000000000000 0.400000000000000 0.200000000000000 0 -0.200000000000000 -0.400000000000000 -0.600000000000000 -0.800000000000000 -1 -2];y = [2.33810586504827 2.48363112635833 2.59789540560919 2.68651302267665 2.72648846698614 2.69134488063110 2.61149695223542 2.50301826645814 2.36832670055008 2.19733884527297 2.15462599514888 2.10857832827275 2.08798291204311 2.01578951993385 1.94042068765623 1.94167961111275 1.94294016918099 2.00902361194571 2.07447470466390 2.10511759010208 2.15825156773687 2.20651917468306 2.24907979002639 2.28863791021804 2.32599132688740 2.48225781636311 2.60543427794120 2.70513001560270 2.76426309168268 2.75408789011821 2.68169848320949 2.57553830229070 2.44374701191763 2.28281884611883 2.24514291617538 2.20489354660741 2.16084874170526 2.11304460385629 2.09187477208419 2.01760146556974 1.94042068765623 1.94167961111275 1.94209961535483 2.00722703371012 2.07160279690479 2.09773984153864 2.14998240464209 2.19572671112384 2.23731037173819 2.40383574880465 2.53053171414469 2.63525873841660 2.70513001560270 2.71988080029850 2.66656564353590 2.56964124836444 2.44574408111832 2.29507324176517 2.26154320447994 2.22566349077475 2.18770139419721 2.14741127045811 2.10462412606314 2.05689038299779 2.02396900851789 1.96376345620852 1.88343329594826 1.88501501612122 1.88580687288077 1.88620305079524 1.88620305079524 1.88541086135770 1.88422382408927 1.86931636930780];% --------------------------------------------------------------------------% 截取一个周期的数据片段x1 = 0:0.1:12.4;y1 = [1.94042068765623 1.97353107687316 2.01760146556974 2.06094498641656 2.09187477208419 2.10411632215472 2.11304460385629 2.13403920670280 2.16084874170526 2.18426625935997 2.20489354660741 2.22517827476020 2.24514291617538 2.26433392057776 2.28281884611883 2.30076691754770 2.31823291757735 2.33524301841175 2.35182339225484 2.36800021131059 2.38379964778295 2.39924787387588 2.41437106179333 2.42919538373926 2.44374701191763 2.45804763381332 2.47210099803497 2.48590636847215 2.49946300901441 2.51277018355134 2.52582715597249 2.53863319016743 2.55118755002574 2.56348949943697 2.57553830229069 2.58733297963381 2.59887158114260 2.61015191365066 2.62117178399160 2.63192899899902 2.64242136550652 2.65264669034771 2.66260278035620 2.67228744236559 2.68169848320949 2.69082752038068 2.69964141400865 2.70810083488209 2.71616645378968 2.72379894152009 2.73095896886200 2.73760720660409 2.74370432553504 2.74921099644352 2.75408789011821 2.75830037378696 2.76183260043428 2.76467341948384 2.76681168035933 2.76823623248443 2.76893592528280 2.76889960817814 2.76811613059411 2.76657434195440 2.76426309168268 2.76117998214582 2.75735762748345 2.75283739477836 2.74766065111337 2.74186876357128 2.73550309923491 2.72860502518705 2.72121590851053 2.71337711628814 2.70513001560270 2.69651210501345 2.68754540898543 2.67824808346009 2.66863828437890 2.65873416768334 2.64855388931487 2.63811560521495 2.62743747132505 2.61653764358665 2.60543427794120 2.59414058780282 2.58265001647617 2.57095106473858 2.55903223336734 2.54688202313979 2.53448893483322 2.52184146922496 2.50892812709231 2.49573740921259 2.48225781636311 2.46847479671253 2.45436158799490 2.43988837533562 2.42502534386007 2.40974267869366 2.39401056496177 2.37779918778981 2.36107873230316 2.34381938362723 2.32599132688740 2.30758075727162 2.28863791021804 2.26918645925561 2.24907979002639 2.22817560660497 2.20651917468306 2.18381932260853 2.15825156773687 2.12953765993429 2.10511759010208 2.09034060135969 2.07447470466390 2.04633717953948 2.00902361194571 1.97037556064539 1.94294016918099 1.93607573809031 1.94167961111275 1.94728389278812 1.94042068765623];