RealFft throws error, what is the proper format?? Please help!

All,
I am hoping that someone can help me with this.  I have been reading all I can here, and I have not been able to make this work.  Would really appreciate someone pointing me in the right direction please.
All I am trying to do, is to plot the FFT of a Low-pass filtered accelerometer signal,
Using NationalInstruments.Analysis.Dsp.Transforms.RealFft(waveform) in c#, according to the examples given (analysis/filtering).
My waveform array, has about 430 values, ranging in values from + to - and I have defined it as double[] waveform.  The entries in the Array look something like this:
"-115.395938987398
-220.355718034111
-194.509250764914
-144.174816090961
-195.916661592532
-184.986891347911
-139.366644956414
-153.343694465293
-103.792322014381
-36.8463180547753
-70.012989029029
-46.268235716388
-9.89187992741799
-4.98874037090368
7.4840283756633
35.238625914635
24.4750060459582
77.5220291336239
99.8803020723934
No matter what I try, when calling the FFt Function(Example)
FFTValue = new ComplexDouble[datasize];
// Calculate the FFT of waveform array.
FFTValue = NationalInstruments.Analysis.Dsp.Transforms.RealFft(waveform);
I always get an exception.  What format must the data be in?  Is the way that I am passing the data to the RealFft function wrong?
I looked at the example for filtering/FFT, and the data passed to the RealFft function looks something like this from that example:
0
176.335575687742
285.316954888546
285.316954888546
176.335575687742
0
-176.335575687742
-285.316954888546
-285.316954888546
-176.335575687742
0
176.335575687742
285.316954888546
285.316954888546
176.335575687742
0
-176.335575687742
-285.316954888546
-285.316954888546
-176.335575687742
Why is there a Zero every four entries? Must my data also be in this format?  This should be straight forward, but I am sure I am doing something stupid, or I am missing something obvious....Can someone please shine some light on this?  I am at a loss as to how I can make this work..
thank you all kindly in advance!
-S

Hi kevin,
Thank you VERY much for replying to mt plea for help :-)
The exception is this:
"The Type initializer for 'NationalInstruments.Analysis.Dsp.Transforms' Threw an exception"
No other information.  It happens when I hit a button, to pass the array to the function, again, like in the example.
I am using this in Visual Studio 2013, after following the instructions to import the tools and references.  No matter how I try presenting it the data, it throws this exception.
Does the data need to be a power of two?  Most other DSPs seem to require this, not sure about this implementation?  I am also making sure the data in the array is valid, and as you can see from my previous post, nothing really special about it....at a loss at this point.
Also, does the array need an imaginary part after the real part?  again, other implementations I have seen also require this, hence my question on the format.
Thanks again!

Similar Messages

  • Tried to access programs and get Error: 16 message. What's the problem? Please help!

    Tried to access programs and get Error: 16 message. What's the problem? Please help! Photoshop, photoshop elements, Dreamweaver - none of my Creative Cloud apps will start-up, since my last update. I need to access these programs for jobs I'm working on.

    Hi wdriver,
    It seems like due to some unknown reason permission from the Licensing folder is removed. Please try launching any of the apps by right clicking and select Run as an Administrator, it should fix the issue by doing that.
    Please let us know if it helps.
    Regards,
    Abhijit

  • I forget my psscood what is the sulution? please help me

    i forget my psscood what is the sulution? please help me

    You will need to restore your iPhone from the same computer that you most recently synced to.
    Read this: http://support.apple.com/kb/ht1212
    If you can't sync then you will need to try recovery mode.
    Read this: http://support.apple.com/kb/ht4097

  • I use photo stills in my iMovie. I want them to last longer than a minute, but when I input 01: 45: 00, to signify one min. and 45 seconds, it doesn't accept it. What is the proper format for inputting minutes?

    I use photo stills in my iMovie. I want them to last longer than a minute, but when I input 1:45:00, to signify one minute and 45 seconds, it doesn't accept it. What's the proper way to input it?

    There are 30 frames in one second of video. So you can specify down to the frame level, which is 1/30th of a second.
    Is the Duration box switching to some other time every time you type in 1:45:00?
    For instance this is a 5 second clip plus 3 frames. To get this set properly I would type in 1:45:00, then click done. I don't know if it is different under older versions of iMovie, as I'm using iMovie '11 for thisi example.

  • After installing Mountain Lion, iMessages and Facetime does not work. When I try to sign-in I get a message that says: The server encountered an error processing registration. Please try again later. Apple care does not know what is the cause. Please help

    After installing Mountain Lion, iMessages and Facetime does not work. When I try to sign-in I get a message that says: The server encountered an error processing registration. Please try again later. After 4 calls to apple and 8 and a half hours on the phone. The apple people does not how to solve the problem. The last thing they told me is that they will send the problem to their engineers and I will hear from them. unfortunately they have not contact me.
    During the phone calls I tried putting the date and time in automatic, changing the username and password, I even tried using somebody elses username and password. Please help, facetime is my tool to telecomute, and it is hurting my job.

    I had the same problem and found the solution here:
    https://discussions.apple.com/thread/3189272

  • My iphone5 was battery emptied. when i charged it, its been hours but the apple logo was keep on blinking. iphone 5 was not opened. what is the best option. please help.

    my iphone 5 cannot be opened. when i charged it, the apple logo kips on blinking but it was not opened. what is the best option to do.? please help.

    - Make an appointment at the Genius Bar of an Apple store. I suspect the battery is on its last legs
      Apple Retail Store - Genius Bar

  • After installing the update firefox will just not open.when i click nothing happens not even any error message,what is the problem? please help!

    when i reinstall the older version it works fine,but when i update it to latest version it will stop working nothing happens when i click on it

    Still the same,i downloaded from the main sit and installed it after that it will start and check add ons compatibility and then just nothing.

  • What is the problem? Please help.

    I have my charger plugged in to my MBP 13" but it is not feeding the battery. The light on the L Magsafe connector is not on as well! Any possible solutions?

    Alex...
    Try here >  Apple Portables: Troubleshooting MagSafe adapters

  • Rsvp, what is the problem? please

    three router 1--2--3, all interfaces enable rsvp by using command "ip rsvp bandwidth ".  loopback 0 of r1 has ip address 1.1.1.1 and loopback 0 of r3 has ip address 3.3.3.3.  using command "ip rsvp sender-host 1.1.1.1 3.3.3.3 tcp 1 1 500" on r3  ; using command "ip rsvp reservation-host 1.1.1.1 3.3.3.3  tcp 1 1 ff ra 500 8 " . show  ip rsvp sender and show ip rsvp reservation is ok.  but show ip rsvp installed is as follow.
    1#show ip rsvp installed
    RSVP: Serial0/0 has no installed reservations
    RSVP: Loopback0 has no installed reservations
    please, what is the problem ?

    please help me ,thanks

  • What is the proper way to reinstall iTunes after error 42404 without losing all my music?

    What is the proper way to reinstall iTunes after error 42404 without losing all my music?

    Here's what I do when I have iTunes problems and it works 9 out of 10 times.  I have Ccleaner; It's a wonderful tool to have.  If you don't have it, google it and install it, just the free version.  You'll see the list of all of your installed programs in there to unstall (among of a host of other things you could do with that program) but anyway, right click on Apple Software first to repair, when done then right click on Apple Application Support to repair, then when done with that, right click on iTunes to repair that and all should be well after that.  No uninstall should be necessary at all when you do all that.

  • What is the proper way to close all open sessions of a NI PXI-4110 for a given Device alias?

    I've found that, when programming the NI PXI-4110 that, if a the VI "niDCPower Initialize With Channels VI" (NI-DCPower pallette) is called with a device
    alias that all ready has one or more sessions open (due to an abort or other programming error) a device reference results from the reference out that has a (*) where "*" is post-fixed to the device reference where and is an integer starting that increments with each initialize call. In my clean up, I would like to close all open sessions. For example, let's said the device alias is "NIPower_1" in NI Max, and there are 5 open sessions; NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4). A simple initialize or reset (using niDCPower Initialize With Channels VI, or, niDCPower Initialize With Channels VI, etc.) What is the proper way to close all open sessions?
    Thanks in advance. Been struggleing with this for days!

    When you Initialize a session to a device that already has a session open, NI-DCPower closes the previous session and returns a new one. You can verify this very easily: try to use the first session after the second session was opened.
    Unfortunately, there is a small leak and that is what you encountered: the previous session remains registered with LabVIEW, since we unregister inside the Close VI and this was never called. So the name of the session still shows in the control like you noted: NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4), etc.
    There may be a way to iterate over the registered sessions, but I couldn't find it. However, you can unregister them by calling "IVI Delete Session". Look for it inside "niDCPower Close.vi". If you don't have the list of open sessions, but you have the device name, then you can just append (1), (2) and so forth and call "IVI Delete Session" in a loop. There's no problem calling it on sessions that were never added.
    However - I consider all this a hack. What you should do is write code that does not leak sessions. Anything you open, you should close. If you find yourself in a situation where there are a lot of leaked sessions during development, relaunching LabVIEW will clear it out. If relaunching LabVIEW is too much of an annoyance, then write a VI that does what I described above and run it when needed. You can even make it "smarter" by getting the names of all the NI-DCPower devices in your system using the System Configuration or niModInst APIs.
    Hope this helps.
    Marcos Kirsch
    Principal Software Engineer
    Core Modular Instruments Software
    National Instruments

  • What is the Proper Way to "Sync My Music & Apps to a New Computer Using ITunes"

    What is the Proper Way for Me to "Sync My Music, Pictures & Apps to a New Computer Using ITunes"?
    I had to buy a New Computer since my other one went out, but when I log into ITunes with the New Computer using My Apple ID "Nothing is there"...
    None of My Previously Purchased Music or Apps are in My ITunes Media Library; so, I any not sure how to Properly Proceed with Syncing?
    Any Help & Guidance would be Greatly Appreciated!!!
    Thanks,
    Don

    Sounds like something might be wrong there. Years ago I set up the playlists to sync to my iPhone and 'Everything' for my iPod and I've never needed to change or even check it since, ever.
    However, how and why are you 'restoring' the iPod? This is not something you should ever need to do. If you restore back to original settings, then I guess that would throw away your own settings, but as I said, there should be no need to keep doing that. Or at all in fact.

  • What is the best format for a master?

    Hi,
    I am about to send my master for replication. Can anybody tell me what is the best format I should save my songs into? I want to avoid any complains that my CD is not "compatible" with someone's CD player.
    Also, any pointers on how to burn my master CD (slowest speed, etc.) to get the best sound quality I can get from Logic Pro?
    As always, thank you sooo much. :>
    Anya

    Hi,
    Your master should be dithered (assuming you started off in 24bit) to 16bit and 44.1 - which is cd quality. Whether it is in aiff. or wav before you burn to CD is not an issue.
    As for the CD itself - use Waveburner to burn the master disk as this burns it to red book compliant quality. In regards to the speed - i tend to burn cd's at 4x as a sound guy friend a fw years ago informed me this would reduce the possibility of errors on a burned cd. If you want to be sure burn it slower even!
    The most important thing is to bounce your tracks down to 44.1 and use Logic's dithering options when making the tracks 16bit too.
    Hope that helps,
    Rounik

  • How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes?

    How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes? I wanted my teenager's AppleID to be different from mine so that she couldn't charge stuff to my AppleID, therefore I created me another one. Now when I go to Sync either device, it tells me that this IOS device can only be synced with one AppleID. Then I get a message to erase it, not going to do that, lol. If I logout as one ID and login as the other, will it still retain all synced information on the PC from the first IOS device? If I can just log in out of the AppleID, then I have no problem doing that as long as the synced apps, music, etc stays there for both. I am not trying to copy from one to the other, just want to make sure I have a backup for the UhOh times. If logging in and out on the same PC of multiple AppleIDs is acceptible then I need to be able to authorize the PC for both devices. Thanks for the help. I am new to the iOS world.

    "Method Three
    Create a separate iTunes library for each device. Note:It is important that you make a new iTunes Library file. Do not justmake a copy of your existing iTunes Library file. If iTunes is open,quit it.
    This one may work. I searched and searched on the website for something like this, I guess I just didn't search correctly, lol. I will give this a try later. My daughter is not be back for a few weekends, therefore I will have to try the Method 3 when she comes back for the weekend again. "
    I forgot to mention that she has a PC at her house that she also syncs to. Would this cause a problem. I am already getting that pop up saying that the iPod is synced to another library (even though she is signed in with her Apple ID to iTunes) and gives the pop up to Cancel, Erase & Sync, or Transfer Purchases. My question arose because she clicked on "Erase & Sync" by mistake when she plugged the iPod to her PC the first time. When the iPod was purchased and setup, it was synced to my PC first. When she went home, she hooked it up to her PC and then she erased it by accident. I was able to restore all the missing stuff yesterday using my PC. However, even after doing that it still told me the next time I hooked it up last night that the iPod was currently synced with a different library. Hopefully, you can help me understand all this. She wants to sync her iPod and also backup her iPod at both places. Both PCs have been authorised. Thanks

  • What is the proper way to record line numbers in Master/Detail records?

    Guys and Gals,
    Been thinking about this for awhile, but thought it best to ask the people who really know what they are doing.
    What is the proper way to record & show line numbers in a Master / Detail record set?
    For example, take Master/Detail relationship Orders and OrderItems. Orders has a column Document_Number and OrderItems has Document_Number, Line_Number. Line_Number should contain the row number 1,2,3,4 ... etc. for each row in a document.
    Should I ...
    <ol><li>Add a sequence and a trigger in the database? The FusionOrderDemo does this, but then the sequence never "resets" and I've got row numbers that keep incrementing. So one document has rows 4,5,6 and the next document has 7,8,9 when they should both have 1,2,3.</li>
    <li>Programmatically take care of the row numbers? This seems like I'm asking for trouble. Anytime an insert or delete operation gets done, I'll have to iterate through rows and re-assign row numbers.</li>
    <li>Is there a way to assign row numbers in a table iterator (or data collection?) to an entity?</li></ol>
    Any suggestions would be appreciated. It's looking like #2 is my only option, but if anyone knows different I'd love the input.
    Will

    Thank you both guys.
    As John said, I believe I'm looking for a gap-free sequence per master record.
    The line number of the OrderItems table is the second half of the primary key. The first half of the primary key (DocumentNumber) is the foreign key to the Orders table.
    Think of it like line items on an order or invoice. For example, if you were talking to someone on the phone concerning an invoice, you might say, "The pricing for line item #3 is incorrect." In this case, it's good to have a common reference. Or imagine a Microsoft Excel spreadsheet with no row numbers displayed! You'd never get anywhere if you had to explain something over the phone.
    If this is tricky to perform, I take it using a sequence and trigger such as the Fusion Order Demo is the best way to approach the challenge for simplicity's sake?
    Will

Maybe you are looking for

  • How do I connect my Mac Book Pro to a Mitsubishi DLP projector?

    How do I connect my MacBook Pro to a Mitubishi DLP Projector?

  • Auto update of time and date

    In my Lumia 625 auto update of time and date is not working properly. It's sowing different form my time zone. Anybody pls help me

  • Brazil - Suggestion - Chart of accounts Annual

    Hello, In Brazil, all software and ERP accounting software has the ability to start a new chart of accounts in the next fiscal year, would be great if we could register the chart of accounts per year, equal to account determining. Of course with the

  • Can´t launch FCE

    Hi! I have a got FCE for 3 month now and it worked fine for a few days ago, but now I can´t launch it?? The problem began when I installed a midi-keyboard called line6 toneport kb37. there is something called gearbox with the midi-keyboard you have t

  • JTree refresh probleme help me please

    a can't reload my JTree from my server my Jtree code:           user.add("Zeus@mxf");           user.add("Neptune@toto");           user.add("Ulysse@mars");      root =new DefaultMutableTreeNode("users");           for(int i=1; i<user.size(); i++)