Getting Eigenvectors of a large array for PCA analysis

Hi,
I am writing code for PCA analysis based on Karhunen-Loeve decomposition. This involves getting eigenvalues and eigenvectors of a very large array i.e. 944x944. I'm getting the error -20062 which indicates that I have exceeded the maximum iterations of this VI. Does anyone have a suggestion as to what I may do from here, besides using different software, or is this my only choice? Thanks in advance.
Marion

This code looks like mine except there are no default values on the 2d array. It is behaving really strange. In LabVIEW 6.1, I created a two nested for loops and added their i's to create the 945X945 matrix. The first time I ran the code, it did not return anything. The second time I ran the code, I hooked up the error output and closed down the windows for "eigenvalue and vector.vi" and it worked!! I saved for previous and the code worked in LabVIEW 6i. I am not sure what is causing the problem.
Attachments:
Not_getting_eigenvalues_or_eigenvectors[2].vi ‏24 KB

Similar Messages

  • BC4J: Any way for fast storing a large array of data

    Hi!
    I know 3 ways for storing data by using BC4J (EJB):
    1.ScrollableRowsetAccess rsAccessC =....
    rsAccessC.setColumnValue(....
    2.oracle.jbo.Transaction currentTRS = ...
    currentTRS.executeCommand("insert ....
    3.By invoking embedded function in ViewObject that use methods from oracle.jbo.server.ViewObjectImpl class.
    The last clause is more quickly than previous ones but not enough fast.
    Maybe somebody know about most efficient ways?
    Because I need store large arrays to Oracle database.
    The average size such array is 130 field multiplying by 15000 records.
    Thanks in advance
    Gali
    null

    Assume you have a big text file to work that you need
    to store and work with, what would be the best way to
    do that?Parse it into a database. Then use SQL to manipulate.

  • Photoshop elements 12 won't load up on my PC. The first time I try to load it up I get a large egg timer, which lasts about 3 seconds. The programme then closes and if I try to load it again I get the circular icon which spins for 1 second and disappears.

    Photoshop elements 12 won't load up on my PC. The first time I try to load it up I get a large egg timer, which lasts about 3 seconds. The programme then closes and if I try to load it again I get the circular icon which spins for 1 second and disappears. I've tried rebooting several times but nothing happens. Please help!

    Hi,
    Please try resetting preferences?
    On Windows: Goto %appdata%\Adobe\Elements Organizer\12.0\Organizer folder and rename the files “psa.prf” (to say psa_old.prf) and “status.dat” (to say status_old.dat).
    Try launching Organizer and see if it launches fine.
    Thanks
    Andaleeb

  • [svn:osmf:] 11069: Minor API change: Use Vector not Array for MediaElement. get traitTypes.

    Revision: 11069
    Author:   [email protected]
    Date:     2009-10-21 16:52:10 -0700 (Wed, 21 Oct 2009)
    Log Message:
    Minor API change: Use Vector not Array for MediaElement.get traitTypes.  Approved by dev team. Should be no impact to sample apps, unit tests, or test apps.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/media/MediaElement.as
        osmf/trunk/framework/MediaFramework/org/osmf/proxies/ProxyElement.as

    Revision: 11069
    Author:   [email protected]
    Date:     2009-10-21 16:52:10 -0700 (Wed, 21 Oct 2009)
    Log Message:
    Minor API change: Use Vector not Array for MediaElement.get traitTypes.  Approved by dev team. Should be no impact to sample apps, unit tests, or test apps.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/media/MediaElement.as
        osmf/trunk/framework/MediaFramework/org/osmf/proxies/ProxyElement.as

  • How do i output multiple arrays from a case structure to create one larger array

    I currently have a vi that has one hardware input that i needed to take a measurement then be moved and take a similar measurement at a different point.  To accomplish this i used a while loop inside a case structure.  The while loop takes the measurement  and finds the numbers i need while the case structure is changed per the new measurement location.  I want to take the data points i have created in each case and output them into a single table.  I assumed to do this the best way would be to get the data from each case into its own built array and build a larger array but I cant get the information out of the case structure so that it all inputs at different places.
    thanks for your help
    Attachments:
    Array.vi ‏30 KB

    Hi Ross,
    attached you will find a solution for your table building problem.
    I would suggest thinking about program design - having the same case content in several cases doesn't make sense. I also would not want my user to press several stop buttons depending on choosen measurement...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Array.vi ‏45 KB

  • Getting a C variable length array

    Hello,
    I'm working on a DLL library. One of the functions should return to LabView a lot of data.
    By the moment I'm doing something like this (using 'by reference' parameters):
    int getDataFromC(int* data1, char* data2, double* data3); 
    The function returns an error code, which is used to know everything goes fine. The memory of each parameter is allocated by LabView when it calls the library function. In C, the function doesn't allocate memory, it just copy the information to the space allocated by LabView (*data1 = xxx. Then LabView uses it by reading each parameter. It works fine.
    The problem is that part of the data that comes from the DLL are arrays. These arrays are generally variable length arrays. Each array always comes with other value, which describes the length of the array. So the returned array can change its length.
    By the moment I'm assuming LabView allocates enough memory to let the C code writes all the array data. But it's not a good practice...
    For example:
    int getArrayFromC(int* len, int array[]);
    The C code writes the length value to the '*len' variable to inform LabView the size of the array, and writes the N ints to the array (assuming there is enough space allocated by LabView). 
    What's the array's length that LabView uses in this case?
    On the other hand, I'd prefer to use something like:
    int getArrayFromC(int* len, int* array[]);
    In this case I can control the length of the array. It is a array-by-reference situation. I could change the array used by LabView.
    What do you recommend? I just need to get a variable length array.
    Thanks!
    Mauricio

    LabVIEW allocates as much memory for an array as is needed.  They are always variable length, as LabVIEW dynamically resizes the array if you add to it.  However, when you call a DLL, the DLL cannot tell LabVIEW to increase the size of the array as it builds it.  So, the array needs to be large enough for the DLL to fill it up, or you could cause memory corruption/crashing.
    Depending on how your DLL has been written, you may be able to use the DLL to help you.  A lot of times, you specify the length as an input with the array, and the DLL checks to see if you have enough memory allocated.  If not, then the call generates an error, and the output of the len input is how big an array is needed.  So, you make a call with a size that typically is going to be large enough, and check for the error.  If you get the error, then you resize your LabVIEW array, and call the function again to get all the data.  Another option is to always call it with 0 elements, knowing you will get an error, then allocate the array.
    If the DLL has not been written to verify you have specified enough memory, then you need to allocate an array you believe is big enough.

  • How to implement large array in Dynamic programming

    Hi, there
    I am working on my dynamic pogramming codes using Java. The code is getting work, but the spead is very slow.
    It is supposed that the very long time run is due to the large array implementation in my codes. Most times, I have two double arrays size up to 320000, and one array of class the same size.
    Each iteration could take 30 minitues, the whole optimaization needs up to 50-100 iteration to get converged.
    Could any experise help me to how to improve the memory performance in Java?
    That is very important for my research.
    Looking for very quick response.
    Cheers
    Jack from Edinburgh

    An array of 320000 doubles isn't considered a large array. It must be
    somewhere in your algorithm implementation that slows down your
    process. Some relevant code snippets could clarify things ...
    kind regards,
    Jos

  • How to get rid of the large slideshow images in Web gallery (CS4)

    Here is the deal.
    I've created a flash web gallery/ But the new CS4 has the option for slideshow with this flash stuff. CS3 use to create thumbnail and large images folders. The new one creates 3 folders: 1. thumbnails, 2, medium images, 3 large images (for the slideshow). That's great, until I go to upload process. I have pretty limited space. So I'm ready to get rid of the slideshow option, but there's no such option in gallery creating process. The only solution I have in mind is to redirect slideshow images to the medium size folder. But thats pretty annoying process during the creation of each gallery.
    So does anyone has an idea how to skip the slideshow creation or another method to skip creating 3 folders, all with the same images?

    Extend DefaultListCellRenderer, not BasicComboboxRenderer. Here's an example that wraps the original renderer and uses it where possible (i.e. instanceof JLabel). No 'white square'.import java.awt.BorderLayout;
    import java.awt.Component;
    import java.text.DecimalFormat;
    import javax.swing.*;
    public class ComboRendererTest {
      public static void main(String[] args) throws Exception {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            new ComboRendererTest().makeUI();
      public void makeUI() {
        JComboBox comboBox = new JComboBox();
        comboBox.addItem(new Double(1));
        comboBox.addItem(new Double(2.25));
        comboBox.addItem(new Double(3.5));
        comboBox.setRenderer(new TwoDecimalRenderer(comboBox.getRenderer()));
        JFrame frame = new JFrame();
        frame.add(comboBox, BorderLayout.NORTH);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(200, 200);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    class TwoDecimalRenderer extends DefaultListCellRenderer {
      private ListCellRenderer defaultRenderer;
      private static final DecimalFormat FORMAT = new DecimalFormat("#.00");
      public TwoDecimalRenderer(ListCellRenderer defaultRenderer) {
        this.defaultRenderer = defaultRenderer;
      @Override
      public Component getListCellRendererComponent(JList list, Object value,
              int index, boolean isSelected, boolean cellHasFocus) {
        Component c = defaultRenderer.getListCellRendererComponent(list, value,
                index, isSelected, cellHasFocus);
        if (c instanceof JLabel) {
          ((JLabel) c).setText(FORMAT.format(value));
        } else {
          c = super.getListCellRendererComponent(list, value,
                  index, isSelected, cellHasFocus);
          setText(FORMAT.format(value));
        return c;
    }db

  • How to get the record set into array?

    Hi,
    I want to get the record set into array in the procedure and do the processing of the array later in procedure.
    below is the stored procedure i am working on:
    procedure bulk_delete_group(p_group_id in Array_GroupListID) as
    begin
    for i in p_group_id.first..p_group_id.last loop
    --Here I have to get the list of user id before deleting group
    SELECT user_id into *<SOME ARRAY>* FROM group_members WHERE group_id = p_group_id(i);
    DELETE group WHERE group_id = p_group_id(i);
    --Process the user id array after group deletion..
    end loop;
    end bulk_delete_group;
    Thanks in advance
    Aditya

    Something like this ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.20
    satyaki>
    satyaki>
    satyaki>select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    13 rows selected.
    Elapsed: 00:00:02.37
    satyaki>
    satyaki>create type np is table of number;
      2  /
    Type created.
    Elapsed: 00:00:03.32
    satyaki>
    satyaki>Create or Replace Procedure myProc(myArray np)
      2  is
      3    i   number(10);  
      4    rec emp%rowtype;  
      5  Begin  
      6    for i in 1..myArray.count
      7    loop  
      8      select *  
      9      into rec 
    10      from emp 
    11      where empno = myArray(i); 
    12     
    13      dbms_output.put_line('Employee No:'||rec.empno||' Name:'||rec.ename); 
    14    end loop; 
    15  End myProc;
    16  /
    Procedure created.
    Elapsed: 00:00:00.88
    satyaki>
    satyaki>
    satyaki>declare
      2    v np:=np(9999,7777);  
      3  begin  
      4    myProc(v);  
      5  end;
      6  /
    Employee No:9999 Name:SATYAKI
    Employee No:7777 Name:SOURAV
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.30
    satyaki>Regards.
    Satyaki De.

  • Do I need a fast system drive if i also have a RAID 0 array for media?

    If my video and media files are all on a Fast RAID array then do i need a fast system drive?
    Im building a system. The only thing on my system drive will be programs. And I will have a RAID array for my video and PSD files - but my System drive is an older UltraDMA EIDE133 250g Maxtor. This system drive is testing at 51mb/s Read, and 26mb/s write. (According to Blackmagic disk speed check program)
    A New SATA drive tests at 53 write and 43 read. So should i bother upgrading my system drive to a RAPTOR 150 or stick with the older EIDE drive? Main Programs i use are Adobe After effects, premiere pro, Photoshop for uncompressed editing with blackmagic intensity.
    Specs:
    MB: Tyan K8WE
    AMD Opteron 270 (dual)
    4GB RAM.
    Nvidia Quadro FX 560
    Apple cinema Display 30'
    4x500gb RAID array (2TB total) on Nvidia SATA motherboard controler.

    Jeron,
    Yes, you are probably.
    - Its i either spend $900 dollars or $200.
    The best possible Rig is this; I spend $500 dollars on a dedicated PCI-X RAID controller card. I buy a Raptor 150g system drive $200. And then buying another 3 drives to add to the RAID array of 2 disks i already have = $300.
    Or option 2: My motherboard (K8WE) has 4 SATA-II ports. So I could set up a 4 disk raid with what i have right now and be achieving 210+ mb/s read and write. My system drive would be off the IDE/133 channel. Then i would only have to spend $200 on 2 disks.
    I have been trying to decipher if it is logical to spend that much more money - when it is possible i will only achieve maybe 50 more Megabytes a second. - and have windows and programs start faster.
    A part of me says - "any time i try to save money on something it comes with calamity and disaster". vs. a part of me that says - "you could get more bang for your buck".

  • How do you get the average of an array bigdecimels

    how do you get the average of an array bigdecimels... I am looping through the array in a for loop
    for (int i = 0; i < prItems.length; i++) {                                                                                                                                                                                                                                                                                                                  

    int sum = 0;
    for (int i = 0; i < prItems.length; i++) {
    sum = sum + prItems;
    int avg = sum/prItems.length;

  • New document alert: How to get PDF documents into Adobe Reader for iOS

    Opening PDF Files in Reader for iOS (iPhone and iPad) has been very helpful to many users of Adobe Reader for iOS.  However, Apple has drastically changed the user interface in iOS 7, which made the original document obsolete. 
    According to Apple Developer Support's App Store Distribution page, 89% of devices connected to the App Store are using iOS 7 during a 7‑day period ending June 29, 2014.
    Because of the exceptionally high iOS 7 adoption rate, Adobe Reader for iOS version 11.3 now supports iOS 7 only.
    Here are the new How-To documents for iOS 7.
    How to get PDF documents into Adobe Reader for iOS (iPad on iOS 7 version)
    How to get PDF documents into Adobe Reader for iOS (iPhone on iOS 7 version)
    (It had to be split into two separate documents because each contains way too many screenshots.)
    Hope these documents are as helpful as the original one.
    Please let us know if you have any feedback or suggestions on the topics for other help documents/tutorials.

    Dennis (or any Adobe rep),
    Any updates to the OP's question? I'm with a large government agency, and we're moving away from GoodReader for reasons I can't go into here, and the ability to add user-defined bookmarks within the app is a mandatory feature for the document reader we select. I have the latest version of Adobe Reader (11.6.1) installed on my government iPad, and the ability to add user-defined bookmarks still seems to be missing. Does Adobe have any plans to add this feature, or is it already present and I'm simply overlooking it?
    Thanks,
    Cam

  • I accidentally deleted my iMovie off my mac, anyone know how to get it back because it came for free and is now 15 dollars to buy back??? pls help

    i accidentally deleted my iMovie off my mac, anyone know how to get it back because it came for free and is now 15 dollars to buy back??? pls help

    If you mean you accidentally removed the icon for iMovie from the Dock (the array of icons at the bottom of the window), you can add it back easily.
    Open the Applications folder (if you open it from the Dock you may then need to click the Open in Finder icon), locate the iMovie program.
    Drag the icon for iMovie down to the Dock, somewhere between the icon for Finder and the dashed line toward the right.
    Wait for the icons at that spot to move aside, then drop it in.

  • Need help optimizing the writing of a very large array and streaming it a file

    Hi,
    I have a very large array that I need to create and later write to a TDMS file. The array has 45 million entries, or 4.5x10^7 data points. These data points are of double format. The array is created by using a square pulse waveform generator and user-defined specifications of the delay, wait time, voltages, etc. 
    I'm not sure how to optimize the code so it doesn't take forever. It currently takes at least 40 minutes, and I'm still running it, to create and write this array. I know there needs to be a better way, as the array is large and consumes a lot of memory but it's not absurdly large. The computer I'm running this on is running Windows Vista 32-bit, and has 4GB RAM and an Intel Core 2 CPU @ 1.8Mhz. 
    I've read the "Managing Large Data Sets in LabVIEW" article (http://zone.ni.com/devzone/cda/tut/p/id/3625), but I'm unsure how to apply the principles here.  I believe the problem lies in making too many copies of the array, as creating and writing 1x10^6 values takes < 10 seconds, but writing 4x10^6 values, which should theoretically take < 40 seconds, takes minutes. 
    Is there a way to work with a reference of an array instead of a copy of an array?
    Attached is my current VI, Generate_Square_Pulse_With_TDMS_Stream.VI and it's two dependencies, although I doubt they are bottlenecking the program. 
    Any advice will be very much appreciated. 
    Thanks
    Attachments:
    Generate_Square_Pulse_With_TDMS_Stream.vi ‏13 KB
    Square_Pulse.vi ‏13 KB
    Write_TDMS_File.vi ‏27 KB

    Thanks Ravens Fan, using replace array subset and initializing the array beforehand sped up the process immensely. I can now generate an array of 45,000,000 doubles in about one second.
    However, when I try to write all of that out to TDMS at the end LV runs out of memory and crashes. Is it possible to write out the data in blocks and make sure memory is freed up before writing out the next block? I can use a simple loop to write out the blocks, but I'm unsure how to verify that memory has been cleared before proceeding.  Furthermore, is there a way to ensure that memory and all resources are freed up at the end of the waveform generation VI? 
    Attached is my new VI, and a refined TDMS write VI (I just disabled the file viewer at the end). Sorry that it's a tad bit messy at the moment, but most of that mess comes from doing some arithmetic to determine which indices to replace array subsets with. I currently have the TDMS write disabled.
    Just to clarify the above, I understand how to write out the data in blocks; my question is: how do I ensure that memory is freed up between subsequent writes, and how do I ensure that memory is freed up after execution of the VI?
    @Jeff: I'm generating the waveform here, not reading it. I guess I'm not generating a "waveform" but rather a set of doubles. However, converting that into an actual waveform can come later. 
    Thanks for the replies!
    Attachments:
    Generate_Square_Pulse_With_TDMS_Stream.vi ‏14 KB
    Write_TDMS_File.vi ‏27 KB

  • Getting index error on ActionListener in for loop

    Hi, I am working on a little project where I want to create an array of buttons that each individually delete their record in an ArrayList, well everytime I press the delete button I get an index error, I have been toying around with it and just can't seem to find my error. Here is the code and thanks for looking:
    for(j = 0; j < records.size(); j++)
                //Set the size for the JTextFields of Names
                textname[j] = new JTextField(15);
                //Set the size for the JTextFields of Values
                textvalue[j] = new JTextField(15);
                //Create the delete button
                deletebutton[j] = new JButton("Delete" + j);
                deletebuttonaction[j] = new ActionListener() {
                    public void actionPerformed(ActionEvent actionEvent) {
                        records.remove(j);
                deletebutton[j].addActionListener(deletebuttonaction[j]);
                //Set the text for the JTextFields of names
                textname[j].setText(records.get(j).getName());
                //Set the value for the JTextFields of values
                textvalue[j].setText(records.get(j).getValue());
                //Add the textfields to the content pane.    
                contentPane.add(textname[j], BorderLayout.CENTER);
                contentPane.add(textvalue[j], BorderLayout.CENTER);
                contentPane.add(deletebutton[j], BorderLayout.CENTER);
            }

    Ok I see exactly what you're saying, now I just need to devise a plan for dealing with this index error, the only thing is that it used to work on only the first click but with the code you see there I actually get my error right away
    Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 5, Size: 5
         at java.util.ArrayList.RangeCheck(ArrayList.java:547)
         at java.util.ArrayList.remove(ArrayList.java:387)
         at GUI$7.actionPerformed(GUI.java:362)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6041)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
         at java.awt.Component.processEvent(Component.java:5806)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4413)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4243)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2440)
         at java.awt.Component.dispatchEvent(Component.java:4243)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Edited by: exutable on Jun 3, 2008 4:49 AM

Maybe you are looking for