How to create L-Shaped Array?

For example, Im trying to create an array that has 1 column of 4 elements with 1 row of 4 elements hence 'L-shaped' but this doesn't seem possible unless you fill the rest of the array with 0s? Which I don't want. I tried using 'replace array subset' to insert the row of 4 elements into the column of 4 elements & vice versa, but that didn't work out. Is there any way around this?
Solved!
Go to Solution.

If you can give some background on why you need an L-shape, someone can probably offer a suggestion to solve your problem.  (if smercurio's idea about clusters doesn't work)
"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

Similar Messages

  • How to create an new array from dynamically discovered type

        public static Object toAdjustedArray(Object source, Object addition,
                                             int colindex, int adjust) {
            int newsize = 0;
            Class componentType = null;
            if (source.getClass().isArray()) {
                Object[] arrayIn= (Object[])source;
                componentType = arrayIn[0].getClass();
                newsize = arrayIn.length + adjust;
            else {
                System.out.println("error in ArrayUtil");
            Object[] newarray = new Object[newsize];
            copyAdjustArray(source, newarray, addition, colindex, adjust);
            return newarray;
        }This methods take an array as an input an append new value(s) to it.
    I can get the component type of the array (i.e. the class of the array's member). But how can I create a new array of this component type (i.e doing something like componentType[] newarray = new componentType[newsize])?
    CU Jerome

    I fanally found a walkaround trick for my problem.
    Their is no way to create an array of a certain type (dynamically dsicovered) in CLDC. But what you can do is to use the instanceof method to determine the type of your array and in a big if statement create the right array.
    Here is the final code:
        public static Object toAdjustedArray(Object source, Object addition,
                                             int colindex, int adjust) {
            int newsize = 0;
            if (source.getClass().isArray()){
                Object[] arrayIn= (Object[])source;
                newsize = arrayIn.length + adjust;
            Object arrayElement = null;
            if (addition.getClass().isArray()){
                Object[] temp = (Object[])addition;
                arrayElement = temp[0];
            else{
                arrayElement = addition;
            Object newarray = null;
            if (arrayElement == null){
                newarray = new Object[newsize];
            if (arrayElement instanceof org.hsqldb.Index){
                newarray = new org.hsqldb.Index[newsize];
            else {
                newarray = new Object[newsize];
            copyAdjustArray(source, newarray, addition, colindex, adjust);
            return newarray;
        }

  • Low-end RAID - Ugh (Or how to create partition level arrays)

    Ok... I got a new mobo and my system is up and running!
    Now let me tell you how I "want" to configure my drives.
    I have two Hitachi 160 SATA drives.  I would like to create two RAID partitions.  Configured like so:
    SATA1        SATA2
    20GB     +    20GB     @ Mirrored    =  20GB C:  (For Windows, etc.)  (Safe)
    140GB   +    140GB   @ Stripped    =  280GB  D:  (For everything else )  (Fast)
    The problem is that the stupid Nvidia RAID BIOS only seems to support creating drive level arrays and not partition level! 
    I only have expierence with high-end server RAID controllers and doing what I have layed out is perfectly possible.  Is this just something that "low-end" RAID controllers do not support?
    Thanks!

    Unfortunatly that is true, this controller does not support partition level arrays, only disc level.
    Be well....

  • How to create a list/array off numbers with boolean attributes

    Hi,
         Maybe the title doesn't explain this too well but what I'm trying to do I'd imagine should be straight forward, I just don't know how!
    I want an array of numbers to be entered by a user, and for each of these numbers I wish to have a boolean, (it will select later what action is performed on that number)
    The array size can vary
    e.g.
    element       Numeric Value              Boolean
    0                       5                             True
    1                       20                           True
    2                       -5                            False
    3                       10                           True
    n                       100                         False
    I don't see any list with numeric and boolean, maybe I just haven't spotted it or do I have to make it somehow?
    Any suggestions please?
    Thanks!
     p.s. if anyone else is using Opera Browser to post here, hitting enter work properly for ye when entering text? For me it causes the cursor to go up one line instead of down! Drives me nuts! It only happens with this NI forum
    Solved!
    Go to Solution.

    Hi thanks for the reply, 
                              It not really what I'm looking for though. 
    I require is a control that inputs both numeric and boolean,  as in the example I mentioned. I guess I'm looking for a cluster really but I thought there may be something more straight forward.
    From the example I gave  
    Element 0 of this array has been entered as a x, and the boolean True was entered (so I perform a "test" A on value x)
    Element 1 of this array has been entered as a y, and the boolean True was entered (so I perform a "test" A on value y)
    Element 2 of this array has been entered as a z, and the boolean False was entered (so I perform a "test" B on value z)
    I could also use a 2d array were I enter another numeric value (0/1 for False/True) but I'm not sure I can limit this column only to accept 0 or zero and the first row any number.
    I was hoping there would be some easier way to do this

  • How to create an Object array(two dimensional) from a properties file..

    Hi All..
    I have a typical problem..
    I have a properties file with key/value pairs . Now what I want to do is.. I need to read all the keys and the values corresponding to that keys and then create a two dimensional array.. Like..
    Properties props;
    Object[][] contents;
    My contents should be like
    contents = {{key1,value1},{key2,value2},{key3,value3},...};
    Can someone tell me how to do this.. asap...
    TIA
    CK

    Just because something is difficult for you does not qualify it as an "Advance Language Topic"... And it certainly doesn't allow you to multi-post.

  • How to create an collection/array/object/thingy from a bunch of objects for eventual export to CSV.

    This is a follow-up to an earlier post (How
    to output a bunch of variables into a table.) Now that I can ouput data for a single computer I need to to do the same for a list of computers into a CSV. In more general terms how do I get a bunch of $Computer objects into a single collection/array/object/thingy
    with a clever name like $Computers?
    # http://ss64.com/ps/get-wmiobject-win32.html
    # http://social.technet.microsoft.com/Forums/en-US/da54b6ab-6941-4e45-8697-1d3236ba2154/powershell-number-of-cpu-sockets-wmi-query?forum=winserverpowershell
    # http://serverfault.com/questions/10328/determine-cpu-processors-vs-sockets-though-wmi
    # http://social.technet.microsoft.com/Forums/windowsserver/en-US/8443fcfd-5a0b-4c3d-bda7-26df83d2ee92/how-to-output-a-bunch-of-variables-into-a-table?forum=winserverpowershell
    Param(
    [Parameter(Mandatory=$false,ValueFromPipeline=$true)]
    [string]$ComputerName = $env:COMPUTERNAME,
    [Parameter(Mandatory=$false,ValueFromPipeline=$false)]
    [ValidateScript(
    If ( $_ -ne $null ) { Test-Path $_ }
    [String]$ComputerListFile
    Function Get-Computer
    Param(
    [string]$ComputerName
    $Win32_PingStatus = $null
    $Win32_PingStatus_Result = $null
    $Win32_OperatingSystem = $null
    $Win32_Processor = $null
    $Win32_PhysicalMemory = $null
    $Win32_ComputerSystem = $null
    $Win32_BIOS = $null
    $Computer = $null
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerName ping succeeded."
    $Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
    If ( $Win32_OperatingSystem -eq $null)
    "$ComputerName WMI failed."
    } Else {
    "$ComputerName WMI succeeded."
    $Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
    $Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
    $Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
    $Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
    $Computer = New-Object -Type PSObject -Property @{
    Name = $Win32_OperatingSystem.CSName
    Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
    Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
    Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
    #Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
    #Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
    Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
    Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
    Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
    Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
    #Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
    #Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
    Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
    Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
    Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
    Win32_Processor_Count = [int]$Win32_Processor.Count
    Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
    Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
    #Win32_Processor_Description = [string]$Win32_Processor[0].Description
    Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
    Win32_Processor_Name = [string]$Win32_Processor[0].Name
    } ## end new-object
    $Computer
    } Else {
    "$ComputerName ping failed."
    $ComputerNameMgmt = $ComputerName + "-mgmt"
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerNameMgmt'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerNameMgmt ping succeded."
    } Else {
    "$ComputerNameMgmt ping failed."
    "$(Get-Date -Format o) Starting script $($MyInvocation.MyCommand.Name)"
    If ( $ComputerListFile -eq $null -or $ComputerListFile.Length -eq 0 )
    "Processing computer $ComputerName"
    Get-Computer( $ComputerName )
    } Else {
    "Processing computer list $ComputerList"
    $ComputerList = Get-Content $ComputerListFile
    $Computers = @{}
    $Results = @()
    ForEach( $ComputerListMember in $ComputerList )
    "$(Get-Date -Format o) $ComputerListMember"
    # Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
    # http://social.technet.microsoft.com/Forums/windowsserver/en-US/e7d602a9-a808-4bbc-b6d6-dc78079aafc9/powershell-to-ping-computers
    # $Compuers += New-Object PSObject -Property $Props
    # $Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
    Get-Computer( $ComputerListMember )
    "$(Get-Date -Format o) Ending script $($MyInvocation.MyCommand.Name)"
    If I try something like this:
    Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name $_
    I get the following, even though $_.Name is not null.
    Add-Member : Cannot bind argument to parameter 'Name' because it is null.
    At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:111 char:107
    + Get-Computer( $ComputerListMember ) | Add-Member -InputObject $Computers -MemberType NoteProperty -Name <<<< $_
    + CategoryInfo : InvalidData: (:) [Add-Member], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddMemberCommand
    Or if I try this:
    $Computers += New-Object PSObject -Property Get-Computer( $ComputerListMember )
    I get this:
    New-Object : Cannot bind parameter 'Property'. Cannot convert the "Get-Computer" value of type "System.String" to type "System.Collections.Hashtable".
    At <path to my script>Get-Hardware_Memory_OSVersion_CPU_Cores_ver04_sanitized.ps1:114 char:47
    + $Computers += New-Object PSObject -Property <<<< Get-Computer( $ComputerListMember )
    + CategoryInfo : InvalidArgument: (:) [New-Object], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.NewObjectCommand

    Hi Aenagy,
    If you want to combine all the computers' information to a single array, and add the property computername in the output, please also try the script below, which I make a little modification of the function Get-Computer, pleaese make sure the account running
    the script has the admin permission of the remote computers, or you need to privide cridentials in get-wmiobject, also note I haven't tested:
    $output = @()#to output information of the all the computers
    ForEach( $ComputerName in $ComputerList ){#loop all the computers
    $Win32_PingStatus = "select * from Win32_PingStatus where address = '$ComputerName'"
    $Win32_PingStatus_Result = Get-WmiObject -query $Win32_PingStatus
    If ( $Win32_PingStatus_Result.protocoladdress )
    "$ComputerName ping succeeded."
    $Win32_OperatingSystem = Get-WmiObject Win32_OperatingSystem -computer $ComputerName -ErrorAction SilentlyContinue
    If ( $Win32_OperatingSystem -eq $null)
    "$ComputerName WMI failed."
    Else {
    "$ComputerName WMI succeeded."
    $Win32_Processor = [object[]]$(Get-WmiObject Win32_Processor -computer $ComputerName)
    $Win32_PhysicalMemory = [object[]]$(Get-WmiObject Win32_PhysicalMemory -computer $ComputerName)
    $Win32_ComputerSystem = Get-WmiObject Win32_ComputerSystem -computer $ComputerName
    $Win32_BIOS = Get-WmiObject Win32_BIOS -computer $ComputerName
    $Computer = New-Object -Type PSObject -Property @{
    Computername = $ComputerName #add the property computername
    Name = $Win32_OperatingSystem.CSName
    Win32_BIOS_SerialNumber = [string]$Win32_BIOS.SerialNumber
    Win32_ComputerSystem_Manufacturer = [string]$Win32_ComputerSystem.Manufacturer
    Win32_ComputerSystem_Model = [string]$Win32_ComputerSystem.Model
    #Win32_ComputerSystem_NumberOfLogicalProcessors = [int32]$Win32_ComputerSystem.NumberOfLogicalProcessors
    #Win32_ComputerSystem_NumberOfProcessors = [int32]$Win32_ComputerSystem.NumberOfProcessors
    Win32_ComputerSystem_TotalPhysicalMemory = [long]$Win32_ComputerSystem.TotalPhysicalMemory
    Win32_ComputerSystem_TotalPhysicalMemory_GB = [float]($Win32_ComputerSystem.TotalPhysicalMemory / (1024*1024*1024))
    Win32_OperatingSystem_Caption = [string]$Win32_OperatingSystem.Caption
    Win32_OperatingSystem_CSName = [string]$Win32_OperatingSystem.CSName
    #Win32_OperatingSystem_OSArchitecture = [string]$Win32_OperatingSystem.OSArchitecture
    #Win32_OperatingSystem_SerialNumber = [string]$Win32_OperatingSystem.SerialNumber
    Win32_OperatingSystem_ServicePackVersion = [string]$Win32_OperatingSystem.ServicePackMajorVersion + "." + [string]$Win32_OperatingSystem.ServicePackMinorVersion
    Win32_PhysicalMemory_Capacity = ($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum
    Win32_PhysicalMemory_Capacity_GB = (($Win32_PhysicalMemory | ForEach-Object { $_.Capacity } | Measure-Object -Sum).sum / (1024*1024*1024))
    Win32_Processor_Count = [int]$Win32_Processor.Count
    Win32_Processor_NumberOfCores = [string]$Win32_Processor[0].NumberOfCores
    Win32_Processor_NumberOfLogicalProcessors = [string]$Win32_Processor[0].NumberOfLogicalProcessors
    #Win32_Processor_Description = [string]$Win32_Processor[0].Description
    Win32_Processor_Manufacturer = [string]$Win32_Processor[0].Manufacturer
    Win32_Processor_Name = [string]$Win32_Processor[0].Name
    } ## end new-object
    $output+=$Computer #combine all the "$computer" to "$output"
    Else {
    "$ComputerName ping failed."
    $output
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna
    TechNet Community Support

  • How to create a string array?

    Thanks!

    Use Create Array, Build Array, an array constant on the block diagram or front panel, for loop, etc. The best way depends on what the heck you're actually trying to accomplish. I suggest you provide some more details and maybe take a class or on-line tutorial. Info on leaning LabVIEW can be found here.

  • How to create oracle.sql.array

    I need to create an oracle.sql.array to pass in my custom objects array to the database. I know you can create it using the ArrayDescriptor class but the problem with that is the connection object is need.
    I am using the writeSql() method of the SQLData interface. I therefore dont have the connection object. Any ideas?

    haha
    you misunderstand. i have in my code:
    <code>
         // update the organisation
         public boolean setOrganisation(Organisation pOrg) {
              Organisation org = pOrg;
              OracleCallableStatement callStat = null;
              Connection conn = null;
              boolean OK = false;
              try {
                   conn = getConnection(getUserName());
                   pOrg.setConnection(conn);
                   callStat = (OracleCallableStatement) conn.prepareCall("{call p_cmt.update_organisation(?)}");
                   callStat.setObject(1, org);
                   callStat.execute();
                   OK = true;
              } catch (Exception e) {
                   logger.severe("error writing organisation with id " + org.getId() + ". " + e);
              } finally {
                   cleanUpConnections(conn, callStat);
              return OK;
    </code>
    This writes the object organisation to the database. Now in the class organisation i have the following method which is called automatically when writing the organisation object to the database:
    <code>
         public void writeSQL(SQLOutput p_stream) throws SQLException {
              p_stream.writeInt(id);
              p_stream.writeObject(country);
         if (finIndexArr == null)
              finIndexArr = new ListElement[0];
         ArrayDescriptor af = ArrayDescriptor.createDescriptor(
         ObjectMapper.elementList, conn);
         ARRAY arr = new ARRAY(af, conn, finIndexArr);          
              p_stream.writeArray(arr);
    </code>
    The problem is the last bit. To put the finIndexArr into an array i need the connection object. So i have to pass into the organisation object the connection object which seems unneccessary and pointless to me. I was just looking at an alternative way of creating the array without the need of the connection object. Since the setOrganisation() above has the connection to the database i dont see why i need to specify it in the array as well

  • Quickie - How to create a ArrayList Array?

    Hi,
    I hope this has a quick answer. What I'm trying to do is create an Array of ArrayList objects to replace a ragged array I had for strings. Basically the length of each 'row' of the array can be variable and I want to take advantage of ArrayLists features. So I created ArrayList
    as below:
    ArrayList[] headerInfo = new ArrayList[3];
    headerInfo[0] = new ArrayList<String>();  
    headerInfo[0].add("aString");If I iterate through each arrayList using a for each loop, will the order be preserved? Or is there a better way to achieve a 'variable length' ragged array?
    Thanks.

    Also, if you end up having to keep a large number of empty spaces in your lists/arrays (so that the "x" and "y" line up with the object you are trying to represent), you can try a Map to reduce the overall memory needed (because you won't need to keep a space for "x,y" pairs that don't have a corresponding value). Your key can be a String generated as:
    String key = x + "," + y;Then your map could be:
    Map<String, String> myStrings = new HashMap<String, String>();The getString method would be:
    return myStrings.get(x+","+y);or the key could be a simple class:
    [For a HashMap, you need hashCode--maybe add the hashCode provided by Integer class for x to the hashCode provided by Integer class for y--I don't know a lot about implementing hashCodes, but that sounds possibly reasonable.]
    class Pair {
       private final int x;
       private final int y;
       Pair(int x, int y) {
          // set values
       // define "equals" (x == other.x, y == other.y)
       // define "hashCode"
       // define "toString" for debugging purposes
    Map<Pair, String> myStrings = new HashMap<Pair, String>();The getString method would be:
    return myStrings.get(new Pair(x, y));For mathematics, if the 2-d array was a numerical matrix, this HashMap would implement what is called a "sparse matrix".
    The map doesn't change your other classes. The other classes would still call:
    String myString = someClass.getString(2, 4);

  • How to create two cookie array?

    hello~
    I want to set two cookies, like
    Cookie c = new Cookie(Name, Value);
    Cookie d = new Cookie(Name, Value);
    but when I trow them into two arrays, like
    Cookie cookies[], delcookies[];
    I don't know how to get them, like
    cookies = request.getCookies();
    delcookies = request.getCookies();
    but it seems wrong!
    Does somebody can tell me how to do, please?
    Thanks very much!!

    hello~
    I want to set two cookies, like
    Cookie c = new Cookie(Name, Value);
    Cookie d = new Cookie(Name, Value);
    but when I trow them into two arrays, like
    Cookie cookies[], delcookies[];
    I don't know how to get them, like
    cookies = request.getCookies();
    delcookies = request.getCookies();
    but it seems wrong!
    Does somebody can tell me how to do, please?
    Thanks very much!!Is this what you wanted?Cookie c = new Cookie(Name, Value);
    Cookie d = new Cookie(Name, Value);
    Cookie[] cookies = new Cookie[2];
    cookies[0] = c;
    cookies[1] = d;

  • How to create a array of GUI components?

    Hello, everyone!
    I need help or advice how to create an GUI components array. As I remenber in VB this possible just by calling two or more buttons (for example) with the same name. The API will authomatically create an array: Buton[0], Button[1], Button[2] and so on...
    In Java it possible as well:
    JButton button[];
    button = new JButton[10];
    for ( int i = 1; i < 10; i++ ){
    button[i] = new JButton();
    ....and so on....
    But my problem is that I use Forte for Java v. 3.0 and when I using Frame Editor it does not allow me to call two components with the same name and at the same time does not allow to change the initialization code painted in blue color...
    Does anyone knows how to avoid this, or how to create GUI components array in Forte for Java API using Frame Editor or Component Inspector???
    All that I need is few buttons accessible by index ( button[1], button[2] etc.) I will apreciate any help or advise.
    Thank you in advance,
    Michael

    I tried using Forte after having used Windows notepad and found that I
    like notepad much better. If you seem to be having problems with Forte,
    you might just try writing this portion of code in a regular text editor
    and compiling it with a command line compiler. Hope this helps some.

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • How can I create a buffer, array or pipeline that stores the last 5000 dates of a voltage measurement with PCI6036 & SCXI1104C and continously drops the last date and inserts the latest date (scanrate 200 or 2000Hz)?

    I develope a porgramm for continious monitoring. If the voltage of a channel exceeds or is lower than the upper or lower limit of tolerance the actual date must be stored and additionally the dates being stored 10sec before and after this event. Can somebody give some advice how to create the buffer to keep the dates 10s before the error event? Thank U.

    I've written you a quick array buffer vi. I'm not sure if it'll be fast enough though.. Try it and see! I've used the loop numbers in my array, but i'm sure you can feed in the dates instead.
    Attachments:
    Array_buffer.vi ‏26 KB

  • How to create and use mutable array of UInt8

    Hello!
    If I get it right, UInt8 *buffer, buffer - is a pointer to a start of array?
    Then how to create and use mutable array of UInt8 pointers?
    The main target is a creation of the module that will store some byte array requests and will send all of them at the propriate moment.

    I try
    - (void) scheduleRequest:(UInt8 *)request {
    if (!scheduledRequests) scheduledRequests = [[NSMutableArray array] retain];
    [scheduledRequests addObject:request];
    But get warning:"passing argument 1 of 'addObject:' from incompatible pointer type"

  • How to create an array in if/else or case structure without 0's ?

    Hello,
    I've been trying to do this for a while now.
    I only managed to think of this in three ways:
    1. (What I'm doing right now Create the array by going through a for loop, which populates the array by auto indexing. It populates with correct number if true and with a '0' if false. The idea was to delete the 0's later on in the code. This however seems highly ineffective.
    2. Make use of a shift register, which automatically adds the correct number to an array. The problem is that the array will keep growing and growing and at the very least would tremendously slow down my program. At worst, it would crash.
    So, my question is: How do I create an array that if a comparison is true, it puts the element in and if not it does nothing ?
    I've attached a PNG snippet of my code.
    Kind Regards,
    David.
    Solved!
    Go to Solution.
    Attachments:
    Get_Indices.png ‏24 KB

    Pladio wrote:
    I've been trying to do this for a while now.
    You did not explain what "this" is. Can you give some typical inputs and expected outputs? Populate your controls and indicators with typical data and make it the default efore attaching.
    Pladio wrote:
    So, my question is: How do I create an array that if a comparison is true, it puts the element in and if not it does nothing ?
    Your code show three different comparisons. Which one are you talking about.
    Pladio wrote:
    I've attached a PNG snippet of my code.
    That code makes very little sense. Why is there a shift register if the data in it never changes? What is the purpose of the inner FOR loop? Why are you creating a 2D array?
    Do you want to remove all rows where the corersponding SD is zero, for example?
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • Excel import on Oracle Linux - How to create an ODBC Connection

    Hi, We have Oracle BI EE on Oracle Linux. We need to create an ODBC DNS and import tables to Admin tool. How would you create a ODBC connection inside Linux to Microsoft excel file using unixodbc. What drivers we need. Please let us know. Thanks! Nil

  • Monitor User Activity

    How can I track a user's mouse or keyboard activity? I am looking for a way to auto-logoff a user from a specific application if they have not touched their workstation in a specified amount of time. Any clues that can be passed my way will be apprec

  • HT3702 I pay four a sing that il cost 0,99€ and apple it take from my credid card 1,98€. Its corect?

    I pay four a sing that il cost 0,99€ and apple it take from my credit card 1,98€. Its corect?

  • Login screen alterations.

    I recently found out you can create custom login screen pictures and remove the apple logo and so on. A part I also loved was the login message. I was wondering if anyone knew how to alter it so it could be made larger, text change and have new line

  • My Photoshop cs6 makes every font oblique

    Hi guys! As said, my Photoshop makes every font oblique. Not italic, but oblique. So that to make the text straight I have to skew it. Does anybody know why this happens and how do I solve it? Thanks! Francesca