Correlatio​n between two arrays

hello,
please i need help in labview. i have collected data in stabilometer and i determined the area and circumference of XY graph for 30 staudents before and after carrying a backpack, so I want to enter the values of the area for the 30 students before and after and do the correlation between them and plot the variation nd the same thing will be done for the circumference.
Any Help Please !!! 

here is my code ... the stabilometer is a device that measures the balance ... in each measurment I have two txt file to save the data which are X and Y where X is the movement of the body to the right and left and Y is the anterior-posterior movement, I have attached the two txt files in the name XB and YB where B means at the begining before the student walk a distance with a backpack , also I extract XE and YE which means the stabilometer measurement after the student walk with a backpack to check if there is any influence of that load on the student's balance... in the code I plot XB in terms of YB and I draw a circle on the XY grpah to calculate the area and circumference, and the same thing will be done with XE and YE... and that will be done for 30 students... So I want to plot the area ( for XB and YB ) for all students by putting the values of the area for each student in an array , and also I want to plot the area (XE and YE) for all the student by putting all the area values in an array and see the difference ... and that will be done using the correlation between them ( between the begining (B) and the end (E) ) 
Attachments:
xB.txt ‏345 KB
yB.txt ‏309 KB
read data (1).vi ‏348 KB

Similar Messages

  • Linear search between two arrays

    I'm having trouble with the comparison of an array of football teams and an array of team names that may or may not be in the football team array. I have read both .txt files into their own arrays and parsed the team array with substring in order to isolate the team name. I know I can read both the search array and the team names individually because I tested it with a println. I think my problem is in the comparison "if" statement.
        public void seqSearch()//Sequential(linear) search
        int j=0, s;
        //int m = j+1;
            for(s=0; s<searchSize; s++)//increments through the search array
              for(j=0; j<teamArray.length; j++)//increments through the team array
               if(teamArray[j].getName().equals(search[s]))//I think this is where the problem is
                   System.out.println("Found " + teamArray[j].getName() + "after" + j + "searches.");
                   break;                 
               else
                   System.out.println(teamArray[j].getName());//prints through all of the names during each search for testing
                   if(j == teamArray.length-1)
                       System.out.println("Can't find " + search[s] + " after " + j + " searches");
            }//end for
        }//end seqSearch()My output prints the names of each team on their own line and at the end it always says that it can't find each search term.
    Ex.
    Bears
    Bengals
    Bills
    Vikings
    Can't find Bills after 32 searches
    Bears
    Bengals
    Bills
    Vikings
    Can't find Eagles after 32 searches
    etc
    I though that .equals was the way to compare in this situation. Any idea what I'm doing wrong?

    Dave,
    teamArray[j].getName().equals(search[s]))what is the implementation class which is returned from "search[s]" and from "eamArray[j].getName()"
    if both of them are java.lang.String then us "equalsIgnoreCase" instead of "equals"
    if the implementation class is different, then you have to override the equal method and implement your own.
    Regards,
    Alan Mehio
    London, UK

  • How can I make a server differ between two or more clients?

    How can I make a server differ between two or more clients?
    The clients can connect and talk to the server fine, but how can I make the server talk to one, two or all clients? i.e. what would be a good way to implement this?
    Currently, the server listens for connections like this:
    while (listening) {
    try {
    new ServerThread(this, serverSocket.accept()).start();
    I guess one way would be to add the ServerThreads to a Hashtable with the client ID as key, and then get the ServerThread with the proper client ID, but this seems unnecessary complicated. Any ideas?

    Complicated was perhaps the wrong word, I should have
    written something like it doesn't "feel" right. Or is
    this a common and good way to solve communication
    between a server and multiple clients?Thats pretty much how I do it. I normally use an array or ArrayList of Sockets instead of HashTable, with [0] being the first player etc.... Then you can communicate with exactly who you want. If you want to send bytes to all of them, just send the same thing to each socket individually (or is there a better way to do this?).

  • How do I set Time Machine to alternate between two attached external drives (so that if one fails I will have a separate backup to use)?

    Hi Everyone.
    Thanks in advance for your help.
    Right off the bat let me say I am using Mavericks 10.9.1 on a 2011 Macbook Pro and using all Lacie external hard drives.
    I am trying to get Time Machine to alternate between two attached external hard drives, trying to be safe in case one of the backup drives itself fails.
    I have both drives set in Time Machine.
    From what I gather Time Machine should by default alternate between drives when backing up (I would assume it does one big initial backup on each then subsequent backups are just changes).
    But this is not how it seems to be working and I cannot find a straight answer despite much Googling and Foruming
    Unfortunately it seems to only be backing up to "External Hard Drive 1".
    There have been 4 backups since I set it up, all on "External Hard Drive 1", even though "External Hard Drive 2" is also attached and set in Time Machine.
    I manually clicked "Back Up Now" and it started to work on "External Hard Drive 2" (like I want it to) for a minute but it appears to have stopped and gone back to backing up to "External Hard Drive 1".
    Am I missing something? Does Time Machine only move on to another disk when the first one runs out of space? Do I have to turn one off in order to force it to back up to the other drive (that would be less convenient of course)?
    I am hoping that I am missing something and that it will just alternate between the two. Otherwise it is not the most comforting and thorough backup system as I had hoped when I purchased the additional external hard drive.
    I have a 1TB drive and a 500gig partition on another drive, both dedicated to backups (my Macbook HD is 475gig). It will take awhile for each to fill up and who knows what could happen during that time. Having Time Machine alternate between hard drives would be a nice small bit of security if the worst happened.
    I realize that there are tons of other options for backing up but I just want to use Time Machine if I can.
    Again thank you for your help!

    You cannot use Time Machine in that way. I'm not sure where you heard that Time Machine alternates between drives automatically. What you can do is create a mirrored RAID array for the backup. This automatically duplicates whatever is on one drive onto the other drive.
    Both drives must be the same size, and prefereably, exactly the same make and model. RAIDs can be configured using OS X's Disk Utility.
    RAID Basics
    For basic definitions and discussion of what a RAID is and the different types of RAIDs see RAIDs.  Additional discussions plus advantages and disadvantages of RAIDs and different RAID arrays see:
    RAID Tutorial;
    RAID Array and Server:
    Hardware and Service Comparison.
    Hardware or Software RAID?
    RAID Hardware Vs RAID Software - What is your best option?
    RAID is a method of combining multiple disk drives into a single entity in order to improve the overall performance and reliability of your system. The different options for combining the disks are referred to as RAID levels. There are several different levels of RAID available depending on the needs of your system. One of the options available to you is whether you should use a Hardware RAID solution or a Software RAID solution.
    RAID Hardware is always a disk controller to which you can cable up the disk drives. RAID Software is a set of kernel modules coupled together with management utilities that implement RAID in Software and require no additional hardware.
    Pros and cons
    Software RAID is more flexible than Hardware RAID. Software RAID is also considerably less expensive. On the other hand, a Software RAID system requires more CPU cycles and power to run well than a comparable Hardware RAID System. Also, because Software RAID operates on a partition by partition basis where a number of individual disk partitions are grouped together as opposed to Hardware RAID systems which generally group together entire disk drives, Software RAID tends be slightly more complicated to run. This is because it has more available configurations and options. An added benefit to the slightly more expensive Hardware RAID solution is that many Hardware RAID systems incorporate features that are specialized for optimizing the performance of your system.
    For more detailed information on the differences between Software RAID and Hardware RAID you may want to read: Hardware RAID vs. Software RAID: Which Implementation is Best for my Application?

  • How can I get extract the data between two cursors on an XY graph

    How can I get extract the data between two cursors on an XY graph

    Well, you say xy graph, so this might be a more complicated problem.
    For a waveform graph it's trivial. Simply get the two cursor indices (property: cursor index) and apply them to array subset of the data. Is that all you need?
    Here's how the above code would look like. using cursor.index instead of cursor.x elimnates the need to include scaling information.
    For an xy graph, there could be multiple segments (e.g. imagine a spiral that passes the desired x range multiple times from both sides). This would neeed significantly more code for a general solution.
    Message Edited by altenbach on 11-24-2009 07:53 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    cursorsubset.png ‏17 KB

  • I have two arrays of points, when i plot them there´s an intersection point, but this point doesn´t belong to any arrays...

    I have two arrays of points, when i plot them there´s an intersection point, but this point doesn´t belong to any arrays. I need to find the both value of this point, X and Y. I attached my problem in a very simple example. Thanks.
    Attachments:
    arrays_plot.vi ‏25 KB

    Although this doesn't directly answer your question , I've attached a VI that will hopefully give you a start and point you in the right direction. It generates a Boolean array that indicates between which indecies an intersection has taken place. Then, all you need to do is use triganometry to work out exactly what the intersection point is.
    Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
    Attachments:
    2x1D_Array_Intersections.vi ‏36 KB

  • What is the best way to get a ratio between two waveforms?

    I'm reading in multiple channels on a PCI 6143 and I want to get the Voltage Standing Wave Ratio (VSWR) between two channels. Right now I have a choice of outputting a 2D DBL or 1D waveform from the daqmx read vi. With the 2D DBL I can use a For Loop and an Index array and compare channels that way, but I was wondering if there is a better function to compare waveforms or even a function to calculate VSWR. Using the For Loop and Index array seems inefficient.

    The PCI-6143 does sample all channels simultaneously (unlike some other DAQ boards), so you should not get any phase differences there. That leaves hardware. You need to make sure your cable lengths are the same and your splitter has the same impedance/path in both directions. You can compensate for splitter problems with cable length or software realignment. You can do a visual check of the waveforms to see if you have a problem. With the frequencies you are likely to measure with the 6143 (10s of kHz), you probably don't need to worry. This is usually only a problem at MHz frequencies.
    You are correct that you do not want to use Express VIs in RT. However, you can use an Express VI to save you a lot of time. Set up the Express VI to do what you want to do, then open the front panel. Cut and paste the code from the block diagram to your RT code, then modify it to make it more efficient. This can often save you a lot of work.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Implementation of linear fit between two cursors

    Hi,
    I am trying to implement a linear fit between two cursors, as I am using total of 4 cursors. I would like to implement linear fit between cursor 2&3. Please help me how to implement it and to find a slope. I am also attaching my code.
    With Regards
    Phani kiran
    Solved!
    Go to Solution.
    Attachments:
    Linear Fit Implementaion.PNG ‏44 KB

    phanikiran wrote:
    Hi koen,
    Now I would like to merge both graphs i.e., Bestfit and XY Graph (in the block diagram). Can you suggest me, I have tried with build array and concenate Inputs function, but no use. Dont mine as I  am new to Labview. Thanks in advance.
    First, get rid of the Express XYGraph subVIs and use the "real" XY graph VIs. The Express ones get you going faster for simple things, but your options are limited.
    Take your X and Y arrays for both your original points and the best fit points (just two points, right?) and combine them into clusters of arrays (instead of feeding them into the XY graph). Then combine these into an array and feed it into your graph. It's all outlined in the XY Graph section of the LabVIEW help file.
    The LV Help File is your friend, learn to use it. It gets lonely if you don't look in on it once in a while.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • How to get percentage difference between two matrices?

    Good day everyone, I just want to ask how to get the percentage difference between two binary matrices. This is for comparing two images converted to matrices in LabView. Thank you. 
    Solved!
    Go to Solution.

    pinkman wrote:
    Good day everyone, I just want to ask how to get the percentage difference between two binary matrices. This is for comparing two images converted to matrices in LabView. Thank you. 
    You probably converted it to a 2D array (A matrix in LabVIEW has a special meaning).
    "Binary" is not very well defined (unless you are looking for the number of bits that are different). What is the datatype? Was it a color image or a greyscale image? Are both arrays the same size?
    How do you define "percentage difference"? Which one of the two is the 100% reference?
    Do you want a new 2D array where each element is the difference of the second array compared to the first (or vice versa), expressed in percentages?
    Do you want to know what percentage of array elements are different between the two arrays?
    Do you want to know the average difference between all array elements?
    All possible interpretations can be easily solved with very little code, but you need to explain in more detail what you actually want?
    Here is a simple solution for case #2, for example (assuming the array have the same size, and we only want a rought estimate, rounded down to the nearest integer percent):
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    PCT-Difference.png ‏16 KB

  • How to find image centroid & seperation between two images

    How to find image centroid and seperation between the images,
    i have 2 images pixel values as shown in the picture i should calculate the centroid of the image & find the distance of seperation of the image.
    help me how to do this
    I am using LabView 7.1
    thanks
    sk 
    Attachments:
    New Folder.zip ‏736 KB

    I have a center of energy program similar to the one used by IMAQ. I have attached an example using your data. I first found the center of the entire image. Then I split the array in two and found the centers of each half. That gives you the position of the two spots. This program won't work if the spots are too close to each other or are separeted in the other axis.
    Attachments:
    distance between two spots one direction.vi ‏1096 KB
    Center of energy calc.vi ‏40 KB

  • Measure separation between two signals that may be coincident

    Hi
    I need to determine the time period between two pulse signals. I'm going to assume for now that I can get these pulses as TTL.
    I was initially drawn to the 'Two-Signal Edge-Separation' method using two counter inputs. However, it's quite possible that the signals would be coincident some of the time. Could anyone please answer the following questions:
    If my signals were coincident, would the 'two-signal edge-separation' measurement be armed on the edge of signal 1 (= same time as edge of signal 2) and continue counting until the next edge of signal 2 as shown below? Or is it re-armed on the next edge of signal 1?
    Is there any other method I could use to log the time between my two pulses? Either as simultaneous counter outputs or something completely different (non-counter method maybe)?
    (Probably not relevant at this stage, but I will be using Measurement Studio to implement this - hardware as yet unselected).
    Thanks in advnace for any help.
    CAS
    Solved!
    Go to Solution.

    Hi CAS,
    The count is not re-armed on the next edge of signal 1 using the two-edge separation mode.  Once the counter is armed the first time, it will continue counting until signal 2 is detected.  
    Alternate Approach 1:
    If you want the count to reset on every edge of signal 1, you could configure an edge count task (counting the internal timebase) using signal 1 as the count reset terminal and signal 2 as the sample clock.  You still would have uncertainty of which signal is detected first if they occur at precisely the same time, so your measured result might be close to 0, or it might be close to 1 full period of the signal in the case that signal 1 and signal 2 are identical.
    If you wanted to remove this uncertainty, you can actually delay signal 2 by enabling the PFI filter for the signal 2 terminal.  The original intent of this feature was to be able to add a debounce filter to avoid picking up multiple edges on transitions, but a result of the implementation is that the signal is delayed by some amount of time (between the pulse width guaranteed to pass and the pulse width guaranteed to not pass).  The best case scenario would be X Series using the 100 MHz timebase, you would add 10 ns of jitter but you could delay the signal by an arbitrary amount.  So, you can add the delay and account for it in your reported values, but you would run into problems if the delay caused signal 2 to occur after the 2nd edge of signal 1 (i.e. if the signals were already close to 1 full period apart).  You'd have to have an idea of the maximum frequency of the signals as well as the maximum delay between them to determine if this would work or not.
    Alternate Approach 2:
    You could use two counters configured as edge count tasks.  Count the fastest internal timebase.  Sample the first counter off of signal 1, and the second counter off of signal 2.  If you arm the counters together and ensure that signal 1 and signal 2 start at the same time, then you can simply subtract your buffered samples of counter 1 from your buffered samples of counter 2 to get an array of differences.
    There are a number of other ways you could get similar results, but I think the above 2 suggestions are probably the easiest to implement.  Alternate Approach 1 has the advantage of still only requiring 1 counter and you don't have to worry as much with arming the counters and starting the sampling together (which could be a problem with Alternate Approach 2 if signal 1 and signal 2 are free-running).
    I would recommend X Series DAQ for this task for the following reasons:
    The count reset feature mentioned in Alternate Approach 1 is only currently available on X Series and 2nd Generation cDAQ.  It will hopefully be added in the somewhat near future to M Series with a driver update but I can't make any guarantees.
    The 100 MHz timebase on X Series gives a 10 ns resolution to your measurement.  M Series and cDAQ use an 80 MHz timebase (12.5 ns resolution), and E Series uses a 20 MHz timebase (50 ns resolution).
    X Series have the most flexible digital filters on their PFI lines and the PFI filters introduce the lowest jitter (compared to M Series and 660x that is--E Series devices do not have digital filters at all).
    You didn't mention what frequency you would be using, but X Series have on-board FIFOs which will help you avoid errors from samples being overwritten if your external frequency is relatively fast.
    X Series are priced similarly to their M Series equivalents.  All X Series have the same counter features with the lowest cost X Series being the PCIe-6320.
    Best Regards,
    John Passiak

  • Swap pallete between two images (JPEG, BMP, PNG)

    Can someone tell me how can i swap the pallete between
    two images ?
    And also the most used color on the first picture to be swapped with the
    most used color on the second picture, and so own according
    to the usage of the color on the pictures.
    Thanks in advance.
    Ilija

    imt wrote:
    And also the most used color on the first picture to be swapped with the
    most used color on the second picture, and so own according
    to the usage of the color on the pictures.Sort of making an array of color values and their occurrence counts? Not really.

  • Difference between two files

    Hi, I need to find difference between two files.
    This is an example:
    oldfile.txt:
    This is the old file.
    I need some help with
    this task!.
    newfile.txt:
    This is the new file.
    I need help with this task please!.
    Differences:
    * old -> new
    * need -> need
    * "some" was deleted
    * please was added
    Notice that I don't care spaces, new lines or tabs.
    The code should looks like:
    enum DifferenceType { Added, Deleted, Replaced };
    class DiffText {
      public String Text;
      public DifferenceType Type;
      public String ReplacedText;
      Diff d = new Diff("oldfile.txt","newfile.txt");
      while(!d.end()) {
        DiffText dtext = d.getNext();
       String s = "";
        switch(s.Type) {
          case Added:       System.out.println(s.Text + " ~ added");
          case Deleted:    System.out.println(s.Text + " ~ deleted");
          case Replaced: System.out.println(s.Text + " replaced by " + s.ReplacedText);
      }Thanks for your help in advance.

    Suppose you have two arrays filled with integers.
    What you want to do is map the integers from one
    array to the other.
    In your example, your arrays would look like:
    this is the old file i need some help with this task
    [0 1 2 3 4 5 6 7 8 9 0 10]
    this is the new file i need help with this task please
    [0 1 2 11 4 5 6 8 9 0 10 12]
    Here, I've assumed you've removed all punctuation and
    new line characters, and changed to lowercase.
    The easiest way is to walk through the arrays greedily.
    However, you may be able to research algorithms that
    do a better job of matching.

  • TS3981 After migration files are now shared between two user accounts. How can I combine them into one account?

    After migration, from PC, files are now shared between two user accounts.I have to switch users to access files. How can I combine them into one account?

    See Pondini's  Transferring files from one User Account to another, for starters

  • Using Lightroom Cloud to Sync Catalog Between Two Machines

    I have use of so many cloud services including the 20gb that Adobe gives me.  Is there a way i can sync my catalog on the cloud so that i can have all my metadata on both my laptop and desk top?  I also have 300gb of cloud storage though Copy.  I would just like some recomendations on how best to go about it. Thanks

    Hi Pat,
    Using Lightroom Cloud to Sync Catalog Between Two Machines
    If you’re running Lightroom on a laptop during your location shoots, you might want to take all the edits, keywords, metadata, and of course the photos themselves, and add them to the Lightroom catalog on your studio computer. It’s easier than it sounds: basically, you choose which catalog to export from your laptop, then you take the folder it creates over to your studio computer and import it.
    You need to decide whether you want to export a folder (all the imported photos from your shoot), or a collection (just your Picks from the shoot). In this case, we’ll go with a collection, so go to the Collections panel and click on the collection you want to merge with your main catalog back in your studio. (If you had chosen a folder, the only difference would be you’d go to the Folders panel and click on the folder from that shoot instead. Either way, all the metadata you added, and any edits you made in Lightroom, will still be transferred over to the other machine.)
    Please refer to http://www.peachpit.com/articles/article.aspx?p=1930499 for more details.
    Thanks!
    Eshant Jindal

Maybe you are looking for

  • Work center planned cost calculation- PM related

    i have created a work center with t-code ir01, used in Maintenance order under operations tab. In cost tab, it is not showing Planned costs of the pm order. Please advise what are check ups or config settings should be done? Thanks.

  • Ipod won't sync with itunes & it's not charging.

    I just got a new laptop, and i've linked my ipod to itunes and everything a few times in the past, and its worked fine. It's been a few months now since i've needed to charge it or load more music onto it, and I just plugged it in to do so and now fo

  • Safari 5.1.7 crashing

    Every time I try to open my safari it crashes.. I don't have Firefox installed so I have no way to get on the internet.. Please help!!

  • Process Order COR1 Screen Elements

    Dear gurus While create Process Order using T-Code COR1 Field GLUZP GSUZP is disabled how to enable it Regards Saad Nisar.

  • Who is spying on me ?

    Hi Little Snitch constantly tells me that NMDB or NATD (and a few other of that type) are trying to connect to IP numbers. More info tells me that they originate from usr/sbin/.... What is this and should I allow these connections on a permanent basi