inverse fourier

G

Guest

I have a complex numbers vector of size 128.
when using the inverse fourier (and I used it before okay) it returns a
complex numbers vector instead of a real number vector as expected.
any idea?
 
D

Dana DeLouis

I have a complex numbers, vector of size 128.

If you do a Fourier Transform, and then do an Inverse Fourier Transform, you
should end up with the original data.
How did you get the 128 Complex numbers? Where they calculated via fft?

The only thing I can think of is that, do to rounding, you have a very small
Imaginary part.
 
G

Guest

Dana
Thanks,

yes, it is true, you fft and you get a complex, you ifft and get back the
original.
however it should work when you already have a complex vector.

and that is the situation, I had a complex vector that I made with the
function complex(a,b).
the inverse is returning another complex? help!

is there a way to attach the file here to show you?
 
G

Guest

Attachments are strongly discouraged in these newsgroups, and are filtered
out on many portals. 128 lines of text in the body of your reply, together
with a brief discreption does not seem excessive.

When Excel produces a complex value, it creates a string where both the real
and immaginary components are limited to 15 significant figures. However, 17
significant figures are required to uniquely characterize a double precision
value. Hence there is ample room for discrepancies in representation that
would prevent complete cancellation of the immaginary part.

Even if you include 17 significant figures in your constructed complex
values, Excel's string to number conversion routines ignore anything beyond
the 15th figure. VBA's string to number conversion routines do use the
trailing figures to get a more accurate representation, so you could try
doing the calculations from VBA to see if that helps.

Jerry
 
D

Dana DeLouis

...I had a complex vector that I made with the
function complex(a,b).
the inverse is returning another complex? help!

Hi. In general, that would be a true statement.
I'm not exactly sure I understand what you are starting from, and the
desired results.
is there a way to attach the file here to show you?

It's best not to post attachments in this group.
Feel free to send me the file. I'd be glad to take a look at it with any
notes you have.
If we come up with anything, we can post back for the bennefit of others
searching for the same question.
 
G

Guest

here is the data:

DATA IN: 256 by 1:

3622432.69085871
-186510.890077619+552318.675643871i
136351.90840889+128685.356316703i
-69406.3590549799+62228.5254163409i
15432.2545613187+135773.659985996i
26529.9244974821+24256.4671123027i
-37356.4750513362+59956.0196862514i
34817.8887398094+70868.6983265412i
-378.053702633329-1954.82408653547i
-15183.9928563519+59506.032353415i
79616.6683927417+61657.1570657672i
-31345.1571340127+33317.4393183982i
-45726.7268574954+177264.801124894i
-70104.5841174498-107626.306430364i
2721.46860748023+49427.3809145383i
10996.7878811993-3772.8767254812i
-10561.2252906057+16218.9902258319i
617.098387886344+14990.254276092i
1650.04100756321+12668.4869100937i
480.347818443383+4675.99376523975i
-4794.00682573092+21172.1078122907i
78410.6888870517-12807.0965508811i
-52497.4679215029+153484.826298038i
-12996.6851367212-11825.75543609i
-32275.0068262009+20994.5376540798i
-3674.05062923781+17620.8993137021i
-12010.980783949+7833.32879650476i
-9843.63643622684+12621.1320688395i
-7454.78007861324+13274.908186235i
-12627.5983747215+11934.4463046931i
-3219.06432237693+11092.7083078565i
-14116.9960944027+7539.98735546925i
-19564.8608038007+30072.1419146335i
-7915.27109697037-1943.05127057098i
-26414.5166740743+1377.7877119916i
6413.85052862666-196.871139400524i
-5941.18844662414+17378.6003873176i
-3440.56441294517-3058.15021244461i
-5776.73796375566+9332.23317665895i
6339.96906827423+11369.9363008505i
-1685.68337230534-1626.51204658462i
-18037.1581001968+21657.3195591783i
5362.00895805778+5213.8456878619i
-8971.78889344235+4740.75121503213i
-6669.5786161148+9305.72421019594i
-4259.52166980098+8313.50934365472i
-6073.39095092408+14352.9423193483i
-11405.4753358087+1321.81413635167i
-3835.68008009027+23282.3598234637i
-2878.87019695855-3690.25994037177i
-8488.23464273469+9689.46749998048i
-2543.40223854608+6691.42756469494i
-3541.11358845537+5594.22596681964i
-8312.19172285422+3828.72141874257i
-7270.24942277045+7148.4083253089i
-2329.40447447986+9836.44489045348i
-437.720959310802+2913.8720885112i
-23477.7266777838+12255.3141830181i
16665.3357171977+44070.2010537826i
-7428.38091110582-35829.7969624059i
-69411.9798326082+35371.113622086i
127348.547989946+11412.111552002i
-124182.173262659-4977.17702926088i
2116.25976277968+1740.73041057433i
-27103.8408086511+9940.71578243508i
-32953.7168722569+14172.5836680927i
1612.87612865253+9161.87960908261i
-3031.41109853599+3289.63939983886i
-12204.304726885+10443.007990756i
-9549.74531665331+9355.57802350887i
-7994.89017384993+13111.7153118193i
-5821.77477815242+2555.5328162224i
-1193.92372142829+1525.63621957201i
-2024.57165154815+5158.55789977582i
-4340.95806833021+663.494707935548i
-2561.40172118033+2614.9508680314i
-3484.03768500436+4168.97301954885i
-5222.93218845766+786.878966445194i
-3486.50718925682+4478.47060368095i
-2520.64272219499+3161.38529398149i
-4879.39135774822+1454.57676477103i
-2389.89830090617+4422.66728331419i
-4103.81325211014+4475.5985722453i
-4524.89913312322+1419.67153246507i
-5409.47720429731+3827.82422748157i
-3027.27094297172+1833.44776772268i
-3483.39489386973+1140.4322964488i
-3103.98084818453+1450.5665748939i
-2090.39405842004+4210.93816764999i
-2895.60989803286+233.221421069531i
-3511.92565235388+1486.07567540548i
-1969.59772491917+4386.27307704067i
-4689.14515973876-2102.54229963075i
-5508.51345444303+842.778107148689i
-3133.55801011661+5238.7772596529i
-4317.78785148141-504.545580361354i
-4567.04740637766+1774.34759946051i
-2407.31013017895+3299.77615913476i
-3373.35648027269+170.699288280137i
-5003.49834850741+2611.55123937115i
-4062.07630458741+2707.85610278658i
-1402.11612747877-11.9973522757371i
-3815.24071526552+294.595085174716i
-3663.85910288134+1503.06429284461i
-3787.91183252016+807.332390545756i
-4001.51873138588+552.846620694775i
-3738.6279402289+1012.58259616029i
-3903.84269027163+1516.03007680691i
-3276.90497222702-116.945827251124i
-3860.88322900542+1557.43949932504i
-3402.07707190253+657.341945628003i
-3989.25772904435+198.234967108445i
-3751.24235597242+1513.72410696396i
-3402.14786611108+93.9610753081316i
-3821.62672866501+918.292322376636i
-3722.72514268017+1044.10741286906i
-3485.39442644249+121.854399099736i
-3815.27199289295+2275.50616396285i
-3053.81637859402-592.868000694285i
-3815.87757802367+1438.23683857028i
-2328.00909338698-354.874949201567i
-4071.26339417212+810.624868558987i
-4650.40355141346+686.275836976206i
-3296.43489908894-592.038979953593i
-3379.25088347144+972.540517056443i
-4208.95409124359-599.226929193025i
-3623.22172576553+365.651591960823i
-4047.95894597953-326.746393009049i
-5165.02426613522
-3020.31845944117+243.796484977239i
-4436.98061078088-447.775252696601i
-4114.08192067184+585.720020301849i
-2567.24678608062-738.847633053236i
-5629.11620892437+1010.98802809457i
-2643.7630081059-390.149080847607i
-5166.5559001179-1028.70737949072i
-2040.46017247446+311.041826301976i
-3527.95720161605-1329.71719047948i
-5182.97959851901+1006.22381023071i
-1984.1063367104-1183.3615552318i
-6449.55425120975-225.485687295366i
-2452.57162940922-687.869267999551i
-4251.80381220956-1021.6588573964i
-3983.45236888172-110.015637987744i
-2870.44739292914-1158.30037201696i
-5691.5187282063-282.824050115541i
-2592.1527082063-500.850118490764i
-3647.5974609244-1471.40227412287i
-4599.26119798413+164.13793201236i
-2820.59173683008-1095.35712545062i
-4205.18007425184-1138.94514912501i
-4564.87375919082-630.679299804958i
-3194.32068864334-680.817999931214i
-3576.19026020344-1467.09896139376i
-4710.65010310097-363.734419901348i
-1013.38466984707+8.67113118286578i
-3899.51339117375-2599.48862168414i
-5123.71881860341-2674.29971969603i
-4853.59381775937-245.602566801708i
-1520.54386679722-2084.25758595682i
-6119.64635579848-2377.54918107375i
-6044.58276987056+706.326393646238i
-1708.58798969788-2856.46918858604i
-10718.535356193-1639.88833168998i
-3821.90880943305+1713.68653846752i
-1267.87658764336-2823.54760620897i
-4459.09619677798-1886.87206059821i
-3047.04175476144-245.418213477714i
-1364.30880888366-2748.29523775604i
-4589.91143845975-2144.97847763686i
-3663.81761875812-1199.50108099509i
-2769.50995736762-1677.33643425941i
-5374.77402230651-3803.26775450303i
-5194.62630931055-1629.79612940721i
-3459.04641522774-3772.4190274406i
-2080.93021075965-3850.90108583167i
-8441.09832632479-2516.34365731338i
-1601.73670875432-2008.89512476274i
-3632.65621698976-4666.20121455565i
-11625.6856292656-1751.50799629192i
-1086.80513096386-1300.46276135211i
-3621.32102084722-3697.02904022451i
-11722.9035757902-1791.78982191061i
-260.525016147098-663.811221058635i
-5295.97607670572-6767.37782790957i
-14101.8513655212-6190.16456447602i
-6011.16354905018-9858.37996946194i
-12697.7334995872-12439.560693828i
-2652.45294102735-2269.65713149005i
-13319.5113338587-14454.1231282101i
1875.69256215351-10654.7980547397i
-45995.1108388051-19781.3666729326i
-1012.01567779045-371.171019314438i
36437.4263698502-29971.6212917804i
-157744.311944114+6322.33552753424i
96399.1537841152-8638.63714087955i
-67530.771520002-34412.4832367762i
-9096.34089701827+43874.9777833468i
9564.98530408104-25293.8694173645i
-25839.8509549925-13488.3371052893i
-261.40107034741-1740.12522496442i
-1960.1251112826-8277.07804580822i
-9075.32498578604-8923.23287837816i
-6287.85787135675-2896.28258259255i
-3059.68837620064-4833.67385342295i
-3346.52140186118-8804.35080809588i
-7285.95530891523-8317.04472642834i
-4283.80329009105+5491.16375255742i
-2977.76988423515-18074.893752506i
-32123.1869592594-3722.85076923609i
-1791.35798694901-4233.42710320169i
-5154.5676163548-10060.4127324626i
-5019.77589265947-7003.83828465762i
-10143.604190251-5359.94598857367i
6147.15824638496-5977.29969610669i
-19023.2634123871-22841.3418838967i
-1755.08896859115+1693.4813483609i
5311.62525428488-9525.73114235217i
-4854.72122322396-7842.72901887793i
-6079.78576595619+5404.02559005162i
-3458.37448405642-10116.108702504i
7595.1424501983+233.130526102173i
-29344.6345927001-1530.62338613152i
-10866.4438454825+2667.50907983946i
-11928.7499865404-18335.0684708033i
-13447.6321963807-7182.47536824898i
-3066.04520289441-10565.4133277134i
-13326.8104153673-12595.2773120671i
-6916.07517697279-12315.6232665807i
-10220.7135067885-13104.605786964i
-11688.668226178-7623.12279537297i
-3704.00952472191-17764.5834199232i
-34517.5520546946-22453.2887085447i
-15541.0947840852+14140.9277975361i
-43069.153160039-125919.625332337i
77957.3701770363+12733.0543945127i
-4420.8444677018-19524.084777931i
483.887872133599-4710.4547710942i
1595.92800698304-12253.0246055987i
628.731541643204-15272.8411962168i
-10845.4223370087-16655.434766213i
11155.1319295139+3827.20282333403i
2682.88171482767-48726.5648051094i
-71215.784653799+109332.249214797i
-45017.7190371505-174516.252542765i
-31039.0345770947-32992.0550917212i
79634.1037790911-61670.6594689248i
-15056.0070436811-59004.4562540559i
-379.102424619784+1960.24677380169i
34617.3799867032-70460.5806936235i
-37358.987898066-59960.0527297269i
26386.8882292741-24125.6882050359i
15480.8878178607-136201.537533738i
-69445.6981989924-62263.7962035762i
136192.368448811-128534.786685159i
-186552.025293371-552440.490235369i


DATA OUT: INVERSE: 256 by 1

7840.00155074917+320.455745311015i
8105.15325965+477.159421352491i
10178.5839359703+8.08930434202466i
10246.4861112451-352.168688541402i
8716.37990429981-256.472644916109i
8932.52315870914+50.8254124239601i
10256.5565141525+62.608051446925i
9956.24924449766-123.102717542663i
8853.4052594709-113.252147209654i
9309.55395097524+104.936387316185i
10237.689186866+118.940456822676i
9747.65603785705-1.50673078267681i
8818.86440664828-128.331104052992i
9182.25153517488+96.3128023402767i
10090.7934119584+302.720531207686i
9768.64781117093-53.6370409329676i
8669.10591505718-349.602002402954i
9300.02102690043-65.5172299929643i
10172.2412578408+199.373701783472i
9717.43321391588-84.8543051945091i
9252.30056251168-424.362662282905i
9538.97191580725-67.797274237765i
9797.769920143+583.739239819394i
9468.87393571739+448.07028890314i
8863.21793017729-171.534521939481i
9260.77487509225-249.338925332404i
9828.78171731202+167.173921907946i
9488.66025576685+206.646352073815i
9125.0299079179-279.794193155463i
9301.56096885963-410.169073860701i
9869.61300273396+6.83503617562673i
9902.84373171276+184.056387062234i
9176.73296021695-144.511457591262i
9014.78663246121-139.50498022708i
9753.62033827657+278.03295571478i
10030.9359639727+434.600302817242i
9321.35495724967-47.7466752819371i
9025.37663562465-414.49848165546i
9461.88848616583-60.1935330747377i
9627.84096156148+394.581176291232i
9343.16243232559+105.522313207241i
9378.92317783183-457.137024006736i
9900.00794425729-263.961247372152i
9855.82845854714+280.915810435703i
9067.1187737394+238.174123487851i
9230.40435995-248.546727538525i
9772.48460806533-55.3730870171764i
9754.85472981113+486.251695809002i
9360.64308328298+315.393459861933i
9199.31440521969-364.88247162049i
9550.40627182155-265.598345501933i
9614.0151725064+228.134297703085i
9260.87772320036-9.78891302583082i
9488.85173834022-644.437739183155i
9754.76854314648-326.427554608996i
9532.79960428079+563.624735133461i
9316.80780393065+513.285893969855i
9331.20070000141-241.420421011936i
9643.2938266007-205.10002821322i
9590.66068492454+364.236399920927i
9165.66379804178+183.892140565955i
9162.72940720376-434.240519653832i
9518.33423400649-239.486314187617i
9794.10937369978+396.088442161398i
9570.29389312435+147.305023761909i
9232.89132680205-501.585476863734i
9512.90488871641-249.387194102582i
10027.9118628466+462.832209034326i
9824.5992992619+267.544609550347i
8864.57873936323-354.230955761909i
8928.34784771664-176.14246373322i
10015.7411669751+502.95447197881i
9984.58849060898+411.826803766518i
8887.5604024028-288.031594808089i
8679.67372911706-551.734493143095i
9912.10621047841-150.716077874456i
10392.8701775172+149.687340480768i
9190.49713391273-136.599010057484i
9745.50409374141-142.194460078285i
12159.4286562682+301.027680878213i
12229.0272615419+482.156110619532i
9424.21958607465-59.4529196307194i
6502.84857536972-492.956701818261i
8705.65632434233+207.806019951219i
12753.5453468989+586.690910263511i
10610.0939425659-338.492293790749i
6928.35346185111-591.883145627605i
8497.49364218682+108.232645681771i
11564.0269052122+395.079551459804i
10386.9702112665-84.2710419651292i
6404.20059455752-303.017043067317i
6889.28338062553+34.7332768825598i
10797.7519899489+283.06958251566i
10190.8902551814+125.242339583908i
6036.17885763433-5.74243632704211i
6298.90868896145-43.5132004794401i
11670.0090462299+25.5971393652659i
14462.6091344673-75.2246321775442i
12290.6683237129-266.770789064169i
11886.4135538754-346.117323900075i
17983.106905881+354.024346439746i
22081.5660751063+195.010308027264i
18579.8249053253-201.650308271238i
15305.0084609571-187.655780784884i
17995.2841643382+384.44018590081i
21034.3763596401+422.097415081481i
16854.357685685-135.597382955605i
11851.2894315033-202.855373509937i
13606.8305632009+2.58397590298122i
18980.049832825-73.461604931666i
18041.5351827003-316.978312360094i
13932.1902761595+114.097329467627i
13616.1705837496+239.65329314352i
16480.4616655445-5.14528140770322i
15459.7248155004-370.818064845171i
11242.0036767954+96.3771446937516i
11373.9671285606+525.304059311772i
15623.6314092849+65.2703046787519i
16514.1501003555-388.680540428811i
13533.2028777648+0.918248103536826i
13792.9712030286+279.510551716311i
18938.7003034006-63.0817892352414i
22408.620626638-322.274169628177i
20641.2094869157-94.986847748533i
18991.0643256121+122.76811574344i
20728.0749079793-198.857555070558i
22062.8613067952-143.874892609739i
18748.4217232629+473.842152764946i
14451.9508446746+550.463885434829i
14121.42084402-112.392572880033i
15649.5342886968-453.992430129864i
14642.535292262-86.3811829408003i
12860.3033078924+148.023645812266i
14536.9497918868-22.0460320798403i
17675.1153309717-242.714958551373i
17663.1739460985-63.2682983306923i
15448.4680987727+83.5759567744654i
15613.5934999875-15.2314053614874i
18085.8615350838+96.1732951707192i
18336.12257782+188.063152662124i
15702.7663537515+41.5840591096458i
15219.5271847966-141.775544522962i
18182.3502515016-1.20966690396517i
19328.3789690401+83.3313719320244i
17623.2496644889+128.117953334813i
17499.1742062216-183.400310531334i
20635.5882106276-128.594313957565i
22264.1790067209-168.208293745655i
19512.481573822-54.8965689410934i
16505.2231663227+161.407335732986i
16689.2414215044+289.500385168141i
16841.2087329541+50.8309579822726i
14132.2634010483-102.653956094771i
12108.7802790298+110.415019663721i
14163.4546008248+137.005723542088i
16643.4385664599-39.69003356187i
15583.2852465341-419.923182334972i
14710.0343458606+21.4095509845176i
17315.2862678758+13.0348965643254i
20585.6212101834-145.323001320327i
20242.7167550577+57.1984432303696i
17809.9222152202+275.976662660947i
17975.532095743+24.6661327451219i
19552.2600528083-105.558908306389i
18301.2290308407+46.5406128210091i
15475.1750800701+206.0540667894i
15621.5972347199+57.0228167502261i
18378.1272131352-235.599758844994i
18660.015488847-134.244081477326i
16542.6760043807+84.4530269751232i
16731.4051917434-74.7240655124619i
19017.9268423482-80.3010127273673i
18268.2303608516-122.922571382427i
15337.7514569812+169.734460759735i
14504.8346051534+362.579729615796i
15854.1440909662-84.3359576063143i
15875.8192327801-143.370878010877i
14379.6418490573+302.44060641868i
14381.7903513126+117.698415043255i
17000.8861302676-393.749121982112i
19028.5386708435-444.312305670912i
19101.4953677822+63.7978292406763i
19430.4155237702+353.4244466072i
21082.3176841598+17.3347960267469i
21615.3136426438-275.561894964819i
19549.9828031958+68.411947468568i
17065.0913231752+416.172006944137i
16686.9482186547+123.920486835007i
16998.193183331-286.497658837625i
15682.9227314361-217.095925016165i
14546.4310379743+191.33503108609i
15141.8337833875+137.215946121949i
16377.327554944-267.696724912078i
16183.6097281528-226.393983232511i
15358.3059320599+147.196006365001i
15941.6592458394+138.500492102059i
17265.4114045506-158.703505626969i
17116.6362337858-116.702461258392i
16138.718645865+351.114160836193i
15896.1278406865+462.262778414771i
16576.1182002947-160.829781905644i
16965.1601853964-456.036364832516i
17248.6425848308-24.1064528689708i
18429.2798793564+243.807910852877i
20248.3286519901-128.561492543614i
21405.7149716271-454.068345440609i
21039.0305616828+1.80569387090634i
19879.0956505632+437.790730316093i
19005.9602406713+146.186880621445i
18245.4298567075-194.345161564841i
16795.7388530412+45.3201435089701i
15175.9497737328+203.790959311885i
13980.459356858-91.4326691077501i
14059.3761725349-256.455407586692i
14418.0043172179+18.2265538351294i
14573.0498105411+222.843366194746i
15028.835514915-123.992894322336i
16159.494934992-288.197395006928i
17084.6283480535+53.2705864185527i
17221.657980077+265.476101914727i
17463.4887821717+40.8061857581788i
18163.2615916733-8.44267737247799i
18028.4470932914+97.4765372033534i
17202.0143828941+116.891092552716i
17102.9772293012-36.9662612964683i
17754.3380950552-146.768447054769i
18575.6429824089-100.094319700416i
19179.9631041313-95.5821203639142i
19778.7593271099-176.668539128046i
20287.2736877528-58.6032548796793i
19853.3900668597+191.730108369397i
18366.3453876304+199.092120235005i
17107.1710747749+21.8689575982088i
16210.4318406279-77.0896202123089i
15087.7436300057+124.69619966137i
14367.1376127796+254.141178705359i
14476.2189341844-34.5085202103167i
14893.6589519948-308.913512141856i
15151.700199185-209.710201259933i
15258.5335144844+74.0794909945342i
15863.5909671739+77.6253269239344i
17459.3825392676-89.1138743225998i
18941.467341368+4.81272400052487i
19040.0513777757+197.035191902071i
18193.9384564359-12.476070543246i
17835.9534394925-94.5299022406289i
17916.1431141813+99.4854820262875i
17265.587308002+121.477435644898i
16414.2118007692-73.1197957069111i
17325.4709892979-170.780747888196i
18982.9751970467-74.6763483149042i
18984.6311331762-95.3112061834856i
17803.5559206734-108.835318107964i
18182.4240025476+30.3967892345644i
19335.1844372437+72.0187999022205i
17933.0494516059-70.5333625292354i
 
D

Dana DeLouis

Hi. I don't really follow. A random array of complex data will most likely
have an Inverse FFt of Complex data as well. I'm not sure what output you
are expecting. Were you working with Integer values at one point?
The first, and mid-point are real values only, so I'm thinking you took a
fft on some data as well??
3622432.69085871
-5165.02426613522

Were you trying to do Convolution on two sets of data? Do you have a small
sample of data (say 8), and then show what you want?
--
Dana DeLouis


Daniel said:
here is the data:

DATA IN: 256 by 1:

3622432.69085871
-186510.890077619+552318.675643871i
136351.90840889+128685.356316703i

<snip>
 
G

Guest

Disagree:

I have done this several times before, this is the first time that I get a
complex return on an inverse. The inverse should return an array of "real"
numbers.

The FT is performed on a time domain array (real), once you perform an FT
you go to the frequency domain (complex array), when you come back (inverse)
it should come back to the time domain (real)
 
G

gimme_this_gimme_that

If you like complex numbers and fourier transforms and if you have
some free time Google JExcel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top