Need to average numbers

How can you make a running average of numbers.  I have tried using
both  the mean and also the example that uses a while loop and
registers.
 An example of what I am trying to do is a sine wave generator was
set up and a random number from .001 to 1  generator was set
up  to add to the incoming sine wave.  This has a wait until
250ms so that the wave dances up an down.  But the phase stays the
same.  For example the peak goes up and down but the  x 
location of the peak does not change.  I have picked off the top
most data points and I would like to get the average of these changing
y values   I thought making a wave from it and using mean
would do it but it hasn't worked.  The mean changes with the new
wave.  Any ideas
I have sent an attachment of something I have tried.
Thanks for any help
R Tucker
Attachments:
averaging work.vi ‏85 KB

You need to remove all wires leading to the shift register on the left side of the FOR loop.  Only a VI with uninitialized shift register can retain history data between calls.
(With every call, you are currently  initializeing all shift registers with the same value and thus you only get current the input value back at each call)
You also need to set the loop count to 1. There is no need to run it 1000 times, it would actually again break the intended function).
Also: Since you are calling this VI in several locations, you need to make it reentrant, else you are mixing numbers from different data threads.
Message Edited by altenbach on 09-13-2005 01:11 PM
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Best way to average numbers across rows and columns

    Hello,
    What is the best way to average numbers both that span across both rows and columns?
    I have a table that holds student names (y-axis), tests they take (x-axis), and their scores. I need to average the student's scrore for all tests and also average the test scores for all students.
    How should I go about saving the data so I can then do some maths on it?
    Thanks.

    So far it looks like jQuery might be the way to go. It seems to be working out quite splendedly. I would still be curious to know how somebody might do this with CF.

  • Acquiring 4 channels at 10kHz using PCI-6070E card and Labview 7.0. I need to average a signal that is time-locked to an analog trigger. Is their an available vi to accomplish this?

    I am acquiring 4 channels of data, sampling at 10 kHz. I am using a PCI-6070E board. I need to average a biological signal time-locked to an analog trigger that occurs at about 3/second. Is there a vi that will accomplish this?

    If you are looking for a way to do a "retriggerable" acquisition, there is a shipping example called Acquire N - Multi-Analog Hardware Trig.vi that accomplishes this. However, please note that this example achieves this effect by reconfiguring the task for each trigger in software. This means there is a delay between reconfigurations. If a trigger signal comes during this reconfiguration, it will be missed. This delay is system dependent on how fast your computer can execute the reconfiguration code. The 6070E does not support hardware retriggerable acquisitions.
    However, if you are wanting to acquire continuously and then do some post-acquisition analysis, I couldn't find any examples that accomplish this, but it wouldn't be too hard to build one yourself. Y
    ou would probably want to include your trigger signal as an additional input channel. Then once you've acquired all of your data, in software you can scan through the data acquired for the 5th channel and then segment your data according to that signal. I hope this information helps.

  • HT5919 My company will not allow us to download iOS 7 due to software / security issues on our end. The problem is I need to download numbers but it says I need iOS 7. Is there any way to get an earlier update that's doesn't require ios7?

    My company will not allow us to download iOS 7 due to software / security issues on our end. The problem is I need to download numbers but it says I need iOS 7. Is there any way to get an earlier update of numbers that's doesn't require ios7?

    Thank you so much! It's updating now. I'm hoping that once the update is finished that it will sync like normal as well. Of course I'm still a bit confused/concerned about how it refused to update on it's own, but for now that's not a problem. Hopefully from now on there won't be any more problems.

  • Need new serial numbers

    Hello! I have Premiere Elements Serial Number  deleted  Photoshop Elements Serial Number deleted - I bought a new computer.. When I install my programs on the new computer I get a message that I have to get new serial numbers, and I have to take the programs out on one of the computer. But I can't  because the old computer doesn't work anymore. So I hope you will resolve my problem because I need those programs and I got them legaly (I paid for them). Thank you very much!!! Antoine Pepe - [email protected]

    First, I am very, very sorry. . . I didn't realize ... Now I know.
    My problem has been resolved by chating with an agent from Adobe. Thank you
    and ... sorry again !!!
    2014-01-28 Barbara B. <[email protected]>
        Re: Need new serial numbers  created by Barbara B.<http://forums.adobe.com/people/Barbara+B.>in *Photoshop
    Elements* - View the full discussion<http://forums.adobe.com/message/6062575#6062575

  • HT4942 I want to be able to update info in Numbers by either iPhone, iPad or MacBook Air.  Do I need to purchase Numbers separately for MacBook Air?

    I want to be able to update info in Numbers by either iPhone, iPad or MacBook Air.  Do I need to purchase Numbers separately for MacBook Air?

    Yes.  Numbers for the Mac is a different program than the app for the iPhone and iPad.  It can be purchased from the Mac App store.

  • When on a phone call when I need to enter numbers on the keypad, the screen goes black and the device doesn't register the numbers.  Sometimes it works, but most times not...very frustrating.  Any recommendations?

    When on a phone call when I need to enter numbers on the keypad, the screen goes black and the device doesn't register the numbers.  Sometimes it works, but most times not...very frustrating.  Any recommendations?

    Is there a case or screen protector that is possibly interfering with the proximity sensor (detects if the phone is near your face, allows the keypad/screen to be visible when the phone is away from your face)

  • I need to Average multiple months.

    I am new to spreedsheets and I am makeing a sheet for my work and I need help.
    I am trying to average multiple cells as I enter new numbers in the cells per week.
    For example $100.00 in cell A1 200.00 in cell B1,C1:L1 are all blank until I enter new numbers. I want to calculate in cell C20 to average all the cells in the ones with $100.00,200.00 and the ones that are still blank. I'm trying to average my income per month and I want to see the average change when I enter new numbers. I tried to do this, I have 12 cells labeled Jan thru Dec using =Average(A1:L1). When I did this it divided the number I entered in cell A1 by 12. I want it to average just A1 then when I enter a number in B1 it will average A1 and B1. and so on and so forth.
    There is got to be a formula for this.
    Please help.
    Rick

    Hi CJ,
    First of all, if you're using row 1 and column A for calculations, make sure that these are not Header row and column cells. Open the Inspector and go to the Table inspector. Click on the Headers & Footer buttons until none of the three are highlighted (blue).
    Entering 100 in B2 and 200 in C2 and =AVERAGE(B2:M2) in another cell (D21, to keep the same relative position as you used, plus two other cells just to check), gave the correct 150 result.
    Entering 300 into D2 changed the average to 200, as it should.
    Entering a text character (a) in E2 made no change (AVERAGE() ignores text).
    Entering a zero in F2 changed the average to 150, as it should.
    If it's not a Header Row problem, the next best possibility is that your "blank" cells actually contain a zero.
    Regards,
    Barry

  • HT1338 I need help with numbers. I try to open numbers and I get a message stating that I need an update. When I go to update apple say I am up to date, but I still can't open numbers. I keep going around and circles. Help

    I cannot open numbers. When I click to open the message says that, I need to update. When I go to updates is says I am updated. I keep going around and circles. Can anyone help?

    Look in your Applications folder for the new version.
    Remove the old icon from the Dock and drag down the new one for ease of use.

  • Need to transfer Numbers

    need to transfer my numbers to my iphone from an mv3

    Then maybe you should ask on a forum dedicated to that particular manufacturer.
    Many dumb phones, even older ones, were able to connect to a computer for backup but may require purchasing a special data connection kit.
    We have absolutely no idea what kind of phone you have.

  • Need help adding numbers to PDF drawing and more

    I'm not an Adobe superuser so hopefully this isn't a stupid question. I receive drawings in PDF from my clients. The drawings look like Autocad and are pictures of parts with dimensions that I build for them. I number all the dimensions on the PDF drawing from 1 to whatever. I then create a spreadsheet with the numbers and the corresponding dimension plus other info. Currently I print the PDF then with a pen I manually number each dimension. Then I manually enter the dimension and special symbols in my spreadsheet. Ideally I'm trying to find a way to just click and have it enter a 1 then click and have it enter a 2 etc. If that's not possible then what's the easiest way to just click and allow me to type 1 then click and I type 2 etc.
    Thanks in advance,
    Mark

    I think what you actually need is a dynamic stamp. Try searching these forums and also acrobatusers.com . There's a lot of information about it.

  • Why does the system need two average costs - 'Average' and 'Average Rates'?

    Hello Gurus!
    The documentation does give definitions for 'Average' and 'Average Rates' cost types, but at a very basic level.
    http://docs.oracle.com/cd/A60725_05/html/comnls/us/cst/settask.htm
    I would like to know why the system needs two costs? How are they calculated and how are they used?
    Thanks!

    Hello,
    I can suggest you a workaround that will help you keep only the 64-bit version of Photoshop.
    Visit "Uninstall a Program" in Windows 7 Control Panel and uninstall Photoshop completely.
    Visit this page and download trial version of Photoshop.
    Run the installer manually and choose the 64-bit version only (uncheck 32-bit version).
    Launch the product and specify your Adobe ID credentials.
    The product will switch to non-trial (i.e. full) mode when it recognizes your Adobe ID.
    Regards,
    Amit Batra
    Engineering Manager,
    Amit Batra

  • Alpha field - need to extract numbers

    Hello,
    I am working on a report that has an alpha field in this format:
    00-00-00
    The users insert numbers where the 0s are.  What I need to do is to add the values in the 3 columns.  So for example:
    03-03-03
    A total of 9.
    Any ideas on how to approach this?  thanks
    David

    If this is consistently the format and there is never any difference...
    Use the LEFT function to pull the first two
    //{@GetLeftTwo}
    tonumber (LEFT(,2))
    The MID function to get the digits in the middle:
    //{@GetMiddleTwo}
    tonumber(MID(,4,2))
    The RIGHT function to get the last two digits:
    //{@GetLastTwo}
    tonumber (RIGHT(,2))
    Then simply do a formula to add all three:
    //{@SumThemAll}
    {@GetLeftTwo} + {@GetMiddleTwo} + {@GetLastTwo}

  • Need FedEx Tracking Numbers for Testing...

    Hi Folks,
    I'm debugging a FedEx tracking utility, but I need a number
    of tracking numbers (preferably a mix of shipping methods, etc) to
    debug. Unfortunately, FedEx support can't provide any, and our
    company has a very limited number (we're tracking inbound orders,
    not outbound).
    If anybody has any FedEx tracking numbers they would be
    willing to share, I would greatly appreciate it! FedEx keeps the
    tracking numbers live for 12 months, so age should not be an issue.
    If you'd prefer an anonomous posting, please just send me
    email and I'll respond directly.
    Thank you!

    Tracking number is specified on delivery_detail_id. You can use following API to update the tracking number. Define a cursor that will fetch the tracking number from staging or intermediate table and pass the following details:
    FOR cur_rec IN cur LOOP
    l_changed_attributes (l_rec_count).delivery_detail_id := cur_rec.delivery_detail_id;
    l_changed_attributes (l_rec_count).shipped_quantity := cur_rec.picked_quantity;
    l_changed_attributes (l_rec_count).tracking_number :=
    cur_rec.tracking_number;
    l_rec_count := l_rec_count + 1;
    END LOOP;
    wsh_delivery_details_pub.update_shipping_attributes
    (p_api_version_number => 1.0
    ,p_init_msg_list => fnd_api.g_false
    ,p_commit => NULL
    ,x_return_status => l_return_status
    ,x_msg_count => l_msg_count
    ,x_msg_data => l_msg_data
    ,p_changed_attributes => l_changed_attributes
    ,p_source_code => l_source_code
    ,p_container_flag => l_container_flag
    );

  • Need to block Numbers On UC 560

    Hello,
    I need to block 900 numbers on my Uc 560, how can i do that??? Is there a way to do it from CCA?? Please let me know how can i do that????
    Thanks,

    Hey
    With the new upgrade you can block numbers on your iphone5.
    Go to:
    Settings
    Phone
    And under calls you will see blocked. Its there

Maybe you are looking for

  • Cinema display causing freezes and kernel panics?

    Okay, if anyone has experienced this before I would like to know. I've been having these powerbook freezes at night., and occasional kernel panics during the day. I usualy leave my computer on all night, but when I check it in the morning it's pretty

  • My second ipod (here we go again)

    Well I didn't think I would ever do it, but I bought another ipod. I posted on here several times about trouble with my first one not being recognized by windows (usb device not recognized) Finally took it to an apple store in Cincy (80 miles away).

  • Document Splitting - full balance sheet

    Hello, Do we we have to setup Document splitting functionality when the requirement is to have a full balance sheet by Segment, Profit Center or by Business Area or are there other possiblities to meet this requirement? Many thanks

  • NIKON D800E files not recognized in lightroom 4.4

    my lightroom 4 is up to date (waiting for lightroom 5 to be given to me - apparently they are having ordering issues so may take 24 hrs and i need to finish this project NOW) why does it not recognize NIKON D800E files? is there a way around this or

  • Shipping condition query

    Hi I have a question regarding shipping condition. This shipping condiion field is fetched from sold to party or from order type(if assignment is there with order type). If assignment with order type is there then this will take precedence over sold