How I average data with 78,74,73 and 55 points respectively and end up with an array of 78 points for the average?

Hi
As the questions states, how do I average data with 78,74,73 and 55 points respectively and obtain an array of 78 points? 
When I use the plus vi, Labview somehow produces an array of 55 points when I do the average (see attached vi).
I have been unlucky in trying to get good results.
Can anyone help?
Thank you.
Attachments:
average4.vi ‏40 KB

The add function is polymorphic. It accepts arrays as well as numerics, but you need to understand one thing about array operations in LV. Operations performed on arrays of different sizes will always (I think) work based on the smallest array. For example, if you auto index 2 arrays of different sizes into a for loop, the number of times the loop will run will be the size of the small array. The same is true here - when you wire 2 arrays of different sizes to the add function, only the first N elements of the larger array get processed. The rest are dumped. That's why you get 55 elements.
Attached is a modification of your VI which shows 2 things:
The bottom part is your algorithm, only cleaned up. Note how much easier it would be to read now. You should always write clean code. Also, note that I have changed the representation on some of the data from DBL to I32. This is because this is the representation the array function work with and your code had the DBLs coerced for no reason.
The top part is a different algorithm which should do what you want. Note that like Mike said, the arrays with smaller sizes will have 0s appended at the end, so if you want to avoid that, you will have to modify the last part, where the averaging is done and only divide those columns which are long enough.
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
Try to take over the world!
Attachments:
average4MOD.vi ‏63 KB

Similar Messages

  • I dropped my mac pro. The disc drive plays but will not record. medium drive error. How hard is it to replace the drive my self. i see screws on the bottom. Could I just order a new internal drive and replace it? Or is it too complicated for the average ?

    I dropped my mac pro. The disc drive plays but will not record. medium drive error. How hard is it to replace the drive my self. i see screws on the bottom. Could I just order a new internal drive and replace it? Or is it too complicated for the average person? Would be cheaper to buy an external drive than to replace internal one? Any advice is appreciated

    How certain are you the superdrive ONLY is at fault?
    That depends on your skill level, if you grew up tearing things apart and putting them together, its absurd how easy it is.
    For some however its too daunting.   On a general skill level for the "average" person its about a 3 out of 10 in difficulty.
    Can you order same? yes.

  • How can i turn my iphone 4s into an ipod touch, the phone has been deactivated and has been recovered, i also do not have a sim card for the phone... can anyone help me.

    How can i turn my iphone 4s into an ipod touch, the phone has been deactivated and has been recovered, i also do not have a sim card for the phone... can anyone help me.

    http://support.apple.com/kb/ht3406
    Apple recommended process

  • How to send data at large IQ rate, at regular intervals and avoid buffer underflow?

    Hello,
    I am using 2921's and I have a Tx that generates payload only once, feeds it to a loop and the loop sends the same packet over and over again at a high rate. Please see attachment for VI screen snapshot. I want to have transmissions at regular intervals of my choice, but it does not work. I tried introducing a wait [ms] module into the loop (not shown in the attached figure), but I am facing the underflow problem.
    Can someone please advise me on how to achieve this? Right now, the packet transmission interval is decided by the USRP, as soon as it sends a packet it sends another one, and if I try to control the transmission interval by using wait [ms] model, I have underflow.
    Here are some details that could help you help me:
    *30, 60, 90 or 120 bytes of payload
    *8/16 bits sample width
    *8 samples per symbol
    *IQ rate of 8 MS/s
    I would like to send every 10 ms, whereas sending 30,60,90,120 bytes takes about 1,2,3,4 ms, respectively.
    Thanks!
    Filip
    Attachments:
    snapshot.jpg ‏178 KB

    Here are some general tips to increase your Tx streaming throughput:
    0) Don't use a continuous generation at all.  For many applications you don't need to stream continuously- a finite transmission (and you can loop a finite transmission) will do and you will basically not underflow in that case if you provide all the data up front.
    1) As you can see from the chart, the bigger the data buffer you provide in each Write call, the faster you can stream.
    2) Write sizes in multiples of the maximum packet size seem to work well.  That number is 363for the USRP-292x series (although that may change in future driver releases).  Try sending bursts of 10890 samples.
    3) If your application allows it, set a Start Trigger Time a little in the future.  Then start writing data before the device starts transmitting.  For example, set the Start Trigger Time to the (current device time + 1 second).  Then start writing data and you will have a second to pre-fill the on-device buffers.  This will substantially reduce the number of underflows.
    4) Be sure to do your data processing out of your write loop, to keep the write loop filling the pipleline as quickly as possible.
    For your specific application, a finite, timed generation may be the write pattern.

  • I'm frustrated with the bookmarks. I so long to be able to right click on any bookmark and choose to have them in alphabet order. Would also like for the little icons to go away. Never been able to figure out how to do this the MAC way. Help.

    I am frustrated with the Bookmarks. I want so much to be able to right click and alphabetize the list. It's been a year and I can get my mind around the process that's there. Also I'd love for those pesky little icons to disappear. Help me please.

    After the release of Firefox 29, several people noticed that after using the Customize feature, most items on the right-click menu for the Bookmarks menu on the menu bar became ''grayed out'' and unusable until you closed and started Firefox back up again. That seems to still be a problem for me in Firefox 36.0.4, so if you used Customize, that could be the explanation.
    You still should be able to click and drag bookmarks around the menu even with the broken right-click context menu.
    And if it's easier than restarting, the context menu still works in the Bookmarks Sidebar (Ctrl+b to open/close) and Library dialog (Ctrl+Shift+b or "Show All Bookmarks").

  • Bex report for the average calculation

    Dear All,
    I like to make a Bex report. On that I like to distribute the last 3 months data on daily average basis.
    From there what will be the stock out of the particular day ( in no.s and from the average value), it should be shown in one line rather than all value.
    Please, guide me how to do.
    regards,
    Balaram

    Hi,
    Try the following
    Create variable1 against 0calmonth with ready for input ....Manual Input --- Mandatory
    Create Variable2 on 0calmonth with out ready for input --- customer exit - interval
    go to cmod write customer exit variable to to populate value for variabl2
    eg. if variable1 = 03.2011  Then variable2 should be between 01.2011 - 03.2011 (If you need coding please let me know)
    Free Char
    Row
    0calday/ Sales Document Date / Billing Date (choose which one you need and select only out of them )
    Column
    Sales Qty 
    --Create New Selection and name as 'Avg Qty 3 Month' 
    --add sales Qty in to new selection
    --Drag and drop 0calday/ Sales Document Date / Billing Date (choose which one you need and select only out of them )
    --Right Click on it and restrict with 0calmoth variable2.
    --Context menu of 0calday/ Sales Document Date / Billing Date (choose which one you need and select only out of them ) and tick constant . 
    make it hide in property
    Create New formula
    Avg Qty 3 Month / 90
    Please note there is leap year also ... it better to calculate no of days between rage in formula...
    Hope this will help you to sole the issue...
    Thanks
    BVR

  • How can I keep My 2 email accounts and all other using HTML? It only lasts temporarily, i.e. for the day...

    (1) - when I open Firefox I recently have clicked on the hyperlink for HTML at the bottom of page, it works great for my gmail and yahoo accounts. However, it is not a permanent fix, as it apparently lasts just for the daily session. How can I keep my internet, et al. HTML permanently?
    (2) - Firefox v24.0 is said to be fast and faster! However, I am not finding it so. when I click on a link or open a tab, it is frustrating as the tab labors too long to open...I more than not click on reload, which appears to help somewhat. Any suggestions?
    (3) - I've just printed out the Mozilla Support Q&A on the error message from Firefox stating that it cannot load the website...how to I remedy this, as it occurs constantly with my Yahoo mail login?
    (4) Finally, several weeks ago I inadvertently popped the "HEALTH" Bookmark (I have a Bookmarks Toolbar), which is excellent (had it with WinXP also, now with Win7), but I seem to pop, double click, or something or other, that makes a bookmark folder jump into the wild blue yonder! I've posted for answers here and elsewhere, printed out and read all variable instructions to navigate and locate, all to no avail. More sage advice please?
    with appreciation and, thanks in advance.

    For #1, is the link to use HTML to simplify the interface?
    It may be that the site stores your preference in a cookie, and you might have set Firefox to delete the cookie when you exit the browser. There are a few built-in ways to do this:
    * Set Firefox to "Keep [cookies] until: I close Firefox" on the Privacy Options (you can create an exception for your mail sites)
    * Set Firefox to "Clear history when Firefox closes" on the Privacy Options
    * Use a private browsing window to visit your mail site
    It's also possible that add-ons or external software may clean out cookies, or that there is a problem with the database file Firefox uses the store cookies.
    For #2, did this problem just start recently? Do you notice any relationship with the type of site content (e.g., pages that use Flash or other media)?

  • I am having trouble with an excel file wanting to save when no changes were made & opening as read only for the 2nd person - but allowing them to save the file.

    1) I am having trouble with an excel file wanting to save when no changes were made.  As soon as you open the file and exit.  It prompts for a save.
    All excel versions are 15.0.4701.1002.
    Using a table.
    the functions CELL, OFFSET, TODAY, INDIRECT, NOW, INFO and RAND are not being used.
    2) Same file.   2nd person is being told they are opening the file as read only - but when they are quitting excel prompts them to save the file. 
    Everything was working fine.  I started having problems with Excel, IT wiped my version out and re-installed office. 
    File is on networked server HP - Windows Server 2012 Essentials.  
    We are all on Windows 8.1 Pro.
    I really hope someone can help - the excel expert had no answer - and passed me along to here.

    I copied the whole file and started deleting worksheets one at a time and testing it by closing it and re-opening it then closing it again – to see if it wanted to save. 
    Once all the pivot tables were deleted – the problem went away. 
    I found that some of the pivot tables had automatic refresh upon open, so this caused the excel to think data had changed. 
    It is fixed now.  By clicking on one cell of the pivot table, analyze, options, data and uncheck the 3<sup>rd</sup> square down to not automatically refresh.  NOT A NETWORK ISSUE.

  • Backup with iOS6, restore iPhone, restore backup -- will I end up with iOS6 or iOS7?

    If I backup my iPhone5 that currently has iOS6, restore the iPhone, then restore backup -- will I end up with iOS6 or iOS7?  When I click "restore iPhone", a message appears that says the latest software will be installed.  I don't want iOS7 (yet).

    Backups are data only, not iOS.
    A restore will always be the current version of iOS for the device.

  • HT203200 Is there a problem with redeeming movies from itunes?  I purchased some movies with digital copies.  But I can not download, due to Code redemption being temporary unavailable for the past 2 days.

    Is there a problem with redeeming movies from itunes.  I purchased some movies with digital copies.  But i can not download movies, due to code redemption being temporary unavailable.

    Hi there Cedric!
    I have an article here for you that I believe will help you out with this issue by reporting it to iTunes. That article can be found right here:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    http://support.apple.com/kb/HT1933
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • For the average person what really is the point of the activity monitor app when all you really want to know is whether your mac is running at its best?

    I have had my imac for nearly 18 months now,
    It's okay, is the best I can say about it.
    It cost me around £800+
    So recently (and foolishly!) I downloaded OS Mavericks when I was actually looking for a freebie word processor programme (I got Bean because it's simple like me.)
    Now the point of all this is that Mavericks has new features like a redesigned Safari (But I ain't noticed any difference yet) and Imaps (Huh!) and Ibooks and Imovie or something.
    So when you are oldish like me, you really don't want people to keep changing and introducing new stuff (most of which is pointless anyway) all the time; because it takes us old ***** a while to get used to the last "improvement."
    So you try and get rid of all these new apps that you don't want and didn't ask for anyway,
    and then you find out you can't, because they're an integral part of the new OS.
    Brilliant!
    Then you find that Mail has to redo itself and this thing no longer works properly etc. and you start wishing you hadn't got up that morning...
    So you try and get it all back the way it was..
    And you can't.
    Because you don't have an external hard drive to use the Time machine back up facility.
    So you get in touch with Apple Support and it's now nearly bedtime, but at least you feel like you might be gettin' somewhere.
    You talk to the supportguy and suddenly you can't remember what the problem is and what your name is, and you're thinking you might as well order in a pizza seein' as you've drunk the last of the gin..."
    Anyway the guy manages to keep his temper and you get some degree of order restored but the machine still seems "jumpy" so someone says to you
    "Check out the Activity Monitor! That'll tell you if something's not working right."
    So you do, but it doesn't.
    Just a bunch of numbers and CPU stuff and User Idiot Input etc.
    All you really want is some little box to pop up and say,
    "Hey! yyyou've really ssscrewed things upppp-p here, old mmmmman!!. This programme is no longer functioning properly, that thing appears to frozen, and you just wiped half your saved photos of Aunt Jessie's 94th birthday celebration (the one's where she had her eyes open)..
    Press here for a full maintenance overview and repair menu.."
    By this time you are on the floor, your leg's got cramp and you really really need a pee.
    But there ain't no maintenance programme, just an activity monitor app you can't make any sense out of, so you yank the **** power cord out of the socket and go to bed..
    So you try and

    DVD-R media that is single layer has 4.3 GB formatted capacity.
    DVD+R DL media has 7.8 GB formatted capacity.
    DVD-R double sided has 4.3 GB on each side.
    Message was edited by: a brody

  • Importing complete and working KM configuration ends up with many errors

    Hello,
    I would like to transport a complete KM configuration from one portal to another, both portals are on the same SP and patch levels. The KM configuration on the source portal is working fine and has no errors in it.
    I have used the Export feature and exported the complete KM configuration from the source portal. The problem is that when I preview import this configuration in the destination portal I see it will end up with many errors, most of them are due to missing references, for example:
    ImportExportConfigException: Upgrade error: "java.lang.Exception: Unable to find the Metadata archive "kmc.util.ctx" that is required for the Metadata archive "coll.appl.ui.gw.gwui"" Inner exception is: Unable to find the Metadata archive "kmc.util.ctx" that is required for the Metadata archive "coll.appl.ui.gw.gwui"
    Or this:
    ConfigException: Cannot migrate the configuration object id "config://local/cm/ui/uicommand/QuickDetailsGroup" from configuration class "config://local/cm/ui/uicommand/UIGroupCommand" (step 2) as its values cannot be set Inner exception is: InvalidEntryException: Invalid commands:OpenAsWebDAVFolder,EditWithOffice
    These are errors related to SAP standard KM and not to custom configuration we may have applied and is under our responsibility.
    I would have thought that when exporting a complete and perfectly working KM config from one portal to another then there shouldn't be any missing files or refrences problems.
    Any ideas...?
    Roy

    I have opened up an OSS with SAP on that and they have said that these errors would indicate that the KMC deployment might have been corrupted during installation. A redeployment as per sap note 895523 would be the best way to eliminate any problems that may have been caused by such an incomplete deployment.
    I am marking this question as answered although did not try this solution as we have decided to go for a full system copy, but just thought it will be worth leaving this note on this thread for other people.
    Roy

  • How to get data from Oracle using Native SQL in SAP.. Problem with date

    Hi Masters.
    I'm trying to get data from an Oracle DB. I was able to connect to Oracle using tcode DBCO. The connetion works fine
    I wrote this code and it works fine without the statement of where date > '01-09-2010'
    But i need that statement on the select. I read a lot about this issue, but no answer.
    My code is (this code is in SAP ECC 6.0)
    DATA: BEGIN OF datos OCCURS 0,
          id_numeric(10),
          component_name(40),
          comuna(10),
          record_id(10),
          status,
          sampled_date(10),
          END OF datos.
    DATA: c TYPE cursor.
    EXEC SQL.
      connect to 'LIM' as 'MYDB'
    ENDEXEC.
    EXEC SQL.
      SET CONNECTION 'MYDB'
    ENDEXEC.
    EXEC SQL PERFORMING loop_output.
      SELECT ID_NUMERIC, COMPONENT_NAME, COMUNA, RECORD_ID, STATUS, SAMPLED_DATE
      into :datos from lims.SAMP_TEST_RESULT
      where     date > '01-09-2010'
    ENDEXEC.
    EXEC SQL.
      disconnect 'MYDB'
    ENDEXEC.
    How can i get the data from that date?? If i delete the where statemet, the program works well, it takes 30 mins and show all the data, I just need the data from that date.
    Any help
    Regards

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • How to pass data from main vi/exe (sender) to many vi/exe (receivers) with one receiver code/vi?

    Hello all
    I am tring to dev some data distribution system, where one vi gets data from hw to shared variable. Vi compiled to app "sender.exe" The others units (receivers) should receive that data from shared var and write it to different serial ports (configured by user in runtime via control). Number of actually working ports may vary.
    Should (and can?) this "receivers" vi's be the one vi, compiled to app "receiver.exe" and executed many times with different settings (diff serial port number)? // I tried this, second+ execution of receiver.exe just makes existing window active instead of creating new process as it works with other languages.
    Or should i build many different vi (receiver1, receiver2, ... with actually the same content) into different .exe to run them at the same time?
    Or may be the best way to build multi-port receiver with ability to communicate with any number of serial ports? // i dont like this, no code reusage here ))
    The question is complicated with possibility to work via network (one of the reasons to make different exe for receivers) and may be the shared vi namespace may not allow many receiver-side vi's to have the same name?
    In short, it should work as SENDER.exe >> RECEIVER1.exe, 2, 3... i.e. "one to many".
    Asking for a best solution advice.
    Please help)

    ns_create wrote:
    Should (and can?) this "receivers" vi's be the one vi, compiled to app "receiver.exe" and executed many times with different settings (diff serial port number)? // I tried this, second+ execution of receiver.exe just makes existing window active instead of creating new process as it works with other languages.
    To allow multiple instances of the same exe, read this.
    (I don't fully understand your setup, so I won't comment further at this time.)
    LabVIEW Champion . Do more with less code and in less time .

  • How to extract data in a webpage to a excelsheet or back end DB

    Hi folks
    I'm kiran and i'm working as technical recruiter. previously i worked as a shadow associate with National Informatics center (A govt of india IT department) where i first tried my hands on JAVA and was amazed with the things which i could do.
    Now with my present company, where we are trying to build a recritment tool and I have taken charge of building it. And this totally deals with the recruitment cycle from saving the data of the candidate to a back end, the status for follow up and the whole recruitment cycle phase.
    Now the problem I'm facing now is with the extraction of data from a web page. I had tried on a testing basis in which tried to work with get and set properties, where i was sucessfull in extracting the data which were stored on the web page in setter and getters pattern.
    But when i tried to do it on a live web page on the net I came to know that the data was stored in data grids and mostly in tables for display.
    I want to know how could i transfer the data in these tables (in a web page) to a excel sheet or a back end data base.
    I need some help on this. It would be appreciated if i could get some sample code, from which i can have a fair idea to start the process
    thanks
    have a great time
    Kiran

    If you want to import in this format, I suggest you use the Java Custom Function JExport. It is more flexible than Dataexport to create the file the way you need it. This thread shows you where to get it
    Any body have JEXPORT utility

Maybe you are looking for

  • JDK 1.3.1 Problem with Pentium 4....

    I have same porblems with JDK 1.3.1 . The same configuration on to computers: Borland JBuilder and JDK1.3.1 On Pentium 3 and WIN2K it run fine, but on Pentium 4 and XP it can not run... Avry sing that i do with java or javaw i have error...

  • Error while creating the proxy object to connect to a third party tool.

    Hi, I tried creating a proxy object with the wsdl file. I even created a HTTP connection to the third party tool. but when I try to execute the whole proxy object, I am getting the below error. Can anyone help me on this? "Proxy-Generierung: Fehler a

  • Vertical drop down menu with effects possible?

    So I have a newbie question. I am using spry 1.6 in DW CS3 and I need a vertical navigation menu in the left column with sub-navs that drop down in the same column (not fly out). Should I use the spry menu or other spry widget to do this? and can I i

  • How to handle make current for programmatic VO

    I have a view object that populates row-sets based on a procedure. The procedure returns an oracle object list, which I am able to convert to the View Object's row. The executeQueryForCollection() runs my procedure stores my data using     protected

  • Change text of 'Overall Result' to Custom text in BEx

    All, Is it possible to change the text 'Overall Result' to custom text (say, Total) in the BEx analyzer. Pls let me know if you need more detail on this. Regards, Anand