Declaring a channel as a variable

Hello Experts! I am very new to this DIAdem. Currently I´m helping my friend with his thesis.
After running a test we got values for x-axis and y-axis that perform a waveform-curve , repeating itself like a sinus-graph (in graphic below).
We tried to determine the max and min values for each cycle (each circle in the graphic require min and max values). They have Channel 1 as X-axis and Channel 2 as Y-axis. Could anyone help me with the script to get the result for 100 cycles in a new Channels.

Hi!
At first you have to copy the values of the first cycle to a new channel(x). Then u get the extreme values of this new channel(x) and and save them to two new other channels(y,z). Next step is to put this function into a loop.
The loop runs 100 times and always copies the next cycle to the channel (x) by overwriting it. After that you get the extreme values again, and write them into the channels (y,z).
After 100 loops you have two new channels (y,z) with all the extreme values of your cycle.
It is important, that the distances between two cycles are always the same!
I hope I could help you

Similar Messages

  • Declare, Set, and Use a variable in a SQL Developer Query

    I come from the SQL Server world and am trying to do something very simple: Declare, set, and use a variable in a query. For example:
    Declare @lastPeriod date;
    Set @lastPeriod = (select max(payperiod) from table 1 where payperiod < current_date);
    Select field 1,
    Field2
    From table2
    Where payperiod = @lastPeriod
    The variable is going to be used in more areas in the query which is why I am simply not using a Sub-query in the where clause. I appreciate any assistance.

    This forum is for issues with the SQL Developer tool. You'd get more response in the SQL And PL/SQL forum.
    That said, read up on bind variables and substitution variables.
    Whenever you can you should use Bind variables (e.g. *:lastPeriod* ), as they increase performance. In sqldev, there's no need to declare as you will be prompted to enter them on execution (F9), but you do if you execute as script (F5) (e.g. VARIABLE lastPeriod VARCHAR2(30);).
    Alternatively, Substitution variables (e.g. *&lastPeriod* ) will literally be substituted in your statement before the database parses it. In sqldev, there's no need to declare as you will be prompted to enter them on execution (either F9 or F5), but you can (DEF lastPeriod='TEST'; ).
    Have fun,
    K.

  • Error with declaring a method with array variable

    Hi,
    I had implemented this:
    import java.awt.*;
    import javax.swing.*;
    public class Oefening1
         public static void main(String args[])
              int array[]= new int[10];
              int getal;
              JTextArea outputArea = new JTextArea();
              Container container = getContentPane();
              container.add(outputArea);
              public void invoerRij(int array[10])
                   output +=" ";
                   for(int counter = 0; counter <10;counter++){
                        output +="Geef een getal in"+"\n"+array[counter]+"\n";
                        outputArea.setText(output);
    I had comilated this code while the compiler gave errors like these:
    A:\Oefening1.java:15: illegal start of expression
              public void invoerRij(int array[10])
    ^
    A:\Oefening1.java:24: ';' expected
    ^
    A:\Oefening1.java:12: cannot resolve symbol
    symbol : method getContentPane ()
    location: class Oefening1
              Container container = getContentPane();
    ^
    3 errors
    Tool completed with exit code 1
    Now i have read my book and finded out that the declaration of a method always starts with public.
    Can anyone halp me solving these probs? Thanks
    Crazydj1

    The problem is that you didn't close the previous method definition.
    Compiler error messages (in any language) often mistakenly report false errors on perfectly valid code immediately following the actual error.
    When you post code on these forums, please wrap in in &#91;code]&#91;/code] tags.

  • Declare custom type as %ROWTYPE variable in package

    I am creating a bunch of custom RECORD types in a package specification like so:
    CREATE OR REPLACE PACKAGE mypackage AS
    TYPE t1 IS RECORD (a number, b number);
    ...For consistency, I'd like to create a custom package type that uses a table %ROWTYPE, something like this:
    TYPE t2 IS RECORD (table%ROWTYPE);Is that possible in any way?
    Tom

    Hi Tom.
    You should read this: http://docs.oracle.com/cd/B10500_01/appdev.920/a96624/05_colls.htm
    "The attribute %ROWTYPE lets you declare a record that represents a row in a database table. However, you cannot specify the datatypes of fields in the record or declare fields of your own. The datatype RECORD lifts those restrictions and lets you define your own records."
    If you want to create a nested table of that records you can do this:
    DECLARE
       TYPE RecTab IS TABLE OF dept%ROWTYPE;
       dept_recs RecTab;
    ...If you just need a record this may help you.
    DECLARE
       dept_rec dept%ROWTYPE;
    ...Hope this helps.
    Regards.

  • Help, can I declare an object using a variable name

    I need to make a bunch of objects using a for loop, so I was wanting to name the object one of the variables that I read. But I basically want to know if I can do this.
         private Software makeObject(String proName, int proStock, double proPrice,String objName){
              Software objName = new Software(proName,proStock,proPrice);
              return objName;
    I want to create a Software object using the objName inputted to it. The software object holds three fields as you can see. The name, num in stock, and price. However it won't let me do this, because it says objName is a duplicate variable. Help would be appreciated

    private Software makeObject(String proName, int proStock, double proPrice,String objName){
    Software objName = new Software(proName,proStock,proPrice);
    ... it won't let me do this, because it
    says objName is a duplicate variable. Help would be
    appreciatedWell, it is duplicate. Change the name of one or the other of those variable names.

  • Reg:Getting error text from a channel into a file or into a variable

    Hi,
    Can we get the error text such as u201Cjava.lang.NegativeArraySizeExceptionu201D  from a communication channel into a variable or in the form of an xml message so that based on kind of error further processing can be done.
    Regards,
    Rahul

    You can decide further processing based on the data available in the mapping. If the value comes in the source field for a list element as you expected do UDF and return error as string and decide the mapping as per business need. I talk about something like enhanced interface determination. That's one way. Reading the error message from the communication channel and decide does not seem to be better option.

  • Communication channel - Variable Substitution error,.

    Hi,
    I am having the following mesage type used in messag emapping as a target structure
    mt_data
       -> Variable1
    I am having a validation on mt_data node in message mapping for generating it, if condition is satisfied mt_data will be generetaed. Under mt_data i am having a variable. This variable is getting populated with some data using normal source to target mapping.
    I am using this variable in my communication channel as a variable substitution, and is used to replace file name.
    The issue I am facing is, when the mt_data fails to get generated (valid reason, since validation to generate it failed), communciation channel in RWB fails saying variable for substitution not found.
    Kindly advice.
    Thanks,
    Mudita

    The issue I am facing is, when the mt_data fails to get generated (valid reason, since validation to generate it failed), communciation channel in RWB fails saying variable for substitution not found.
    1) make a check on the variable in receiver determination itself...so that if fails then the message stops in Receiver determination itself....why to take it forward till channel and then fail.
    2) Make use of some constant term to fill the variable in the mapping if the validation fails.....this will help to put value in the variable even when the validation fails and the message does not fail in channel...filename created.
    You need to check with the functional people on how they want the message prcessing to occur when the variable cannot be created by the mapping logic.
    Regards,
    Abhishek.

  • Use global variable in reports which is declared in forms

    Hi All,
    I have declared and used a global variable in Forms and after that I'm running a report and I want to use the same variable in reports.
    How can I use that.
    Regards
    Praveen Kr. Arora

    Hi Rizwan,
    Thanks for prompt reply.
    Can you explain in more detail with example.
    Though I'm calling report from menu item and I have created report file with three parameters.
    In menu item I have created a parameter list with same three parameters but whenever I tried to run then it gives Invalid ID error for all three parameters.
    Regards
    Praveen Kr. Arora

  • "Dynamic Declaration/Variable"

    Hi,
    first sorry for my bad english :)
    I have a Problem with Forms Builder 6
    I want to know if it possible to set dynamic declarations inside a loop
    loop_i := 1;
    WHILE loop_i < 10 LOOP
    go_item('GERAET' || to_char(loop_i) || '.Beginn'); --Geraet1.Beginn to Geraet10.Beginn... this works without problems
    if (':GERAET'||to_char(loop_i)||'.Beginn') is null then
    :GERAET || to_char(loop_i) || .Beginn := ('01-JAN-1234'); -- here is my problem
    END LOOP;
    My Problem is in this Line :GERAET || to_char(loop_i) || .Beginn :=
    I cant fill fields dynamic like this. Is there any way to fill Geraet1.Beginn to Geraet10.Beginn with this Loop? I dont know the syntax for declarations with " : " and a dynamic variable
    i hope you understand what i mean :)

    Use the Name_In() and Copy() built-ins (see the online doc)
    Francois

  • Declaring partition as a variable

    Hi,
    i have the following problem, I have a partitionate table and i want to use it in a procedure
    these what i want to do
    declare
    p_data date;
    v_part1 varchar2(50);
    v_part1 varchar2(50);
    cursor c1 is
    select cam1,cam2,cam3....
    from tabela1 partition (P010110) a,
    tabela2 partition (P010210) b
    where a.cam1 = b.cam1
    and a.cam2 =p_data;
    begin
    p_data := to_date('31.03.2010','dd.mm.yyyy')
    the problem it's i can declare the partition as a variable , to use automatically in procedure every month
    I tried to declare partition as
    select 'P'||to_char(p_data,'dd.mm.yy')
    into V_part1
    from dual
    and i tried as
    v_part1 := 'P'||to_char(p_data,'dd.mm.yy')
    And the result while be
    select camp1,camp2,camp3....
    from tabela1 partition (V_part1) a,
    tabela2 partition (P010210) b
    where a.camp1 = b.camp1
    and a.camp2 =p_data;
    end everything i tried dose not work :(
    end ideas

    Your approach is wrong. Partitioning is a physical feature of the database. It has no place in SQL from the (logical) application layer.
    Does the application layer know whether the table is a hash table or an index organised table? Perhaps a clustered table? No. There's absolutely no need for the application layer to know the physical storage structures used by the database. And partitioning is a physical storage structure feature.
    Code plain normal application SQL - the Oracle CBO (Cost Based Optimiser) has all the intelligence and physical storage information required to make a proper decision on how to apply partition pruning+* to that application SQL.
    * As Boneist suggested, read up on partition pruning to understand how to correctly and effectively use partitioning in Oracle

  • Why should i declare a variable serialVersionUID?

    hello all,
    the following code giving warning saying that
    The serializable class newFrame does not declare a static final
    serialVersionUID field of type long.
    why should i need to declare a static final
    serialVersionUID variable? is their any resason
    public class newFrame extends JFrame{
         public ContentPaneTest() {
             super("Content pane");
             getContentpane().add(new JLabel("hello all"););
             setVisible(true);
             pack();
             setDefaultCloseOperation(EXIT_ON_CLOSE);
         public static void main(String args[]){
              new newFrame();
    }thanks
    daya

    two options:
    1) You could explicitly specify a serialVersionUID to remove the warnings.
    2) If you just want to remove those specific warnings, you could do so by changing the compiler settings of your IDE (for Eclipse, "Potential programming problems" / "Serializable class without serialVersionUID").
    serialVersionUID is used during deserialization to verify that the sender and receiver of a serialized object have compatible corresponding classes (for that object).
    If you don't care about serialization, 2) would be your choice.

  • Photoshop CS6 using javaScript to truncate alpha channel name

    Hello,
    I'm a production artist and I work with PSD files that were created in Adobe Scene7 Image Authoring Tool. These PSDs contain a background layer along with 1-20 alpha channels. My script has to make a new blank layer for every alpha channel in the document. Then it fills the new layer with light gray. So far, my code accomplishes this. However, I'd like to apply the name of the alpha channel to the layer, but I need the name to be truncated. Every alpha channel starts with one or more characters followed by a backslash and then finishes with one or more characters. Here's an example:
    An alpha channel might be named:  Floor\floor
    In this example I need my layer name to be just:  floor. This means all character to the left of the backslash, including the backslash itself needs to be discarded. I was using the subSring() statement to do this. When I try to step through the code, line by line in ExtendScript, I immediately get an error that says Unterminated String Constant and Line 31 of my code is highlighted. I suspect it doesn't like the way I wrote the backslash character, although I surrounded it in double quotes to define it as a string.
    Can anyone tell me why I'm getting this error?
    Below is my code with lots of comments to walk you through the process. I wrote where the error occurs in red type.
    I'm new to JavaScript so I'm not sure my while loop is accurate.
    #target photoshop
    // The #target photoshop makes the script run in PS.
    // declare variable to contain the active document
    var myDoc=app.activeDocument;
    // declare variable to contain the number of alpha channels, excluding the RGB channels
    var alphaChan = myDoc.channels.length - 3;
    alert(alphaChan + " alpha channels exist");
    // create loop to make new layers based on number of alpha channels, fill layer with gray and apply alpha channel name to new layer
    for (a=0 ; a<alphaChan ; a+=1){
    // make new blank layer
    myDoc.artLayers.add();
    // fill blank layer with gray
    var color = new SolidColor();
    color.rgb.red = 161;
    color.rgb.green = 161;
    color.rgb.blue= 161;
    myDoc.selection.fill(color);
    //variable stores alpha channel name
    var alphaName = myDoc.channels[3+a];
    // variable stores lenght of alpha channel name
    var lz = alphaName.length;
    // declare index variable to initialize position of 1st  character of alpha channel name
    var x= 0 ;
    // truncate alpha channel name by removing all characters preceding the "\" symbol
    while (alphaName.subString(x) != "\"){          (ExtendScript gives an error for this line and highlights the backslash and surrounding quotation marks)
        alphaName = alphaName.subString((x+1),z);
        x+=1;
        z-=1;
    return alphaName;
    // remove the backslash from alpha channel name
    alphaName = alphaName.subString((x+1),z);
    //  apply truncated alpha channel name to corresponding layer
    myDoc.artLayers[a].name = alphaName;

    while (alphaName.subString(x) != "\"){ 
    should be
    while (alphaName.subString(x) != "\\"){ 

  • Assigning value to a variable.

    i have one doubt.
    we can assign value to a variable either in declaration section or in exectuion section.
    so please explain when and wherer should we assign value to a variable.
    thank you very much.

    I think the best way to look at it is...
    If you don't want your variable(s) to have default values that are NULL, assign a value in the declaration section, otherwise assign it where you feel like.
    If you take an example of:
    declare
      v_sum number := 0; -- default variable to 0
      cursor cur_test is
    begin
      for i in cur_test
      loop
        v_sum := 0; -- set variable to 0 before the loop
        loop
          exit when .. some condition ..
          v_sum := v_sum + ..
        end loop;
      end loop;
    end;
    /.. we have a need to set the variable v_sum to 0 before each iteration of the internal loop, so there's little point in having it defaulted to 0 in the declaration section, hence I wouldn't typically default it there and would typically have the code as..
    declare
      v_sum number; -- no point in defaulting it
      cursor cur_test is
    begin
      for i in cur_test
      loop
        v_sum := 0; -- set variable to 0 before the loop
        loop
          exit when .. some condition ..
          v_sum := v_sum + ..
        end loop;
      end loop;
    end;
    /It all depends on what you're doing and what seems the most logical or preferred option.
    Defaulting values in the declaration section can let you see clearly what the starting values are for things, but only if you really need to do it.

  • Using variables in ODI 11.1.1.5

    Hi,
    i have created 4 variables in ODI 11g as mentioned below:
    1.Variable_name = v_date
    datatype = alphanumeric
    default value = '30-NOV-2011 11:00:00'
    2.Variable_name = v_time_offset
    datatype = alphanumeric
    default value = 125
    3.Variable_name = v_starttime
    datatype = alphanumeric
    default value = '30-NOV-2011 11:00:00'
    4.Variable_name = v_endtime
    datatype = alphanumeric
    default value = '30-NOV-2011 11:30:00'
    I have created a filter on the source table to pull the records only for the time between v_starttime and v_endtime.
    Now, in the ODI package, I have declared all the above 4 variables. Here I want to calculate the variable values v_starttime and v_endtime to pass on to the interface. I have used the below calculations to set the variables :
    v_starttime = #v_date+(#v_time_offset/1440)
    v_endtime = #v_date+((#v_time_offset+5)/1440)
    Now when I execute the package, the package(the interface) is getting failed with the error - invalid character. When I looked into the variables to see whether they are refreshed properly, they didn't. In the Operators, Under 'History' of variables section, the value of both the variables are showing as #v_date+(#v_time_offset/1440) and #v_date+((#v_time_offset+5)/1440) only. Thats means the varaibles are not evaluated properly. Kindly help me how can I fix this ? Many thanks in advance ...
    regards,
    sai

    Hi Sai,
    Please try below one
    Take 2 more ODI variable 1) v_STime and 2) v_ETime
    In v_STime write below query
    select to_date(to_char(v_date,'yyyy-mm-dd'),'yyyy-mm-dd')+(to_number(#v_time_offset)/1440) from dual;
    In v_ETime write below query
    select to_date(to_char(v_date,'yyyy-mm-dd'),'yyyy-mm-dd')+(to_number(#v_time_offset)+5/1440) from dual;
    Note: For v_date,v_starttime and v_endtime variable please don't take default value just write below query
    Query: select sysdate from dual;
    Hope this may helps you
    Regards,
    Phanikanth

  • Variables in SELECT query

    consider the query
    SELECT v_column_name FROM v_table_name
    I have declared and defined v_column_name, v_table_name variable but still Oracle PL/SQL
    complains
    it says v_table_name not declared.
    If i put this query in a string and open
    with cursor it works fine.
    Please send me mail at [email protected]

    Does any one knows answer to this problem
    thanks
    Pramod

Maybe you are looking for

  • Error message: "unable to load [...] from Sync Services

    I've tried resetting sync history with no avail. On the "Info" tab of the device (iPhone 4), I am unable to check the "Sync Contacts with" and "Sync Calendars with" options. Until about a week ago, it always synchronised with Outlook 2010 without a p

  • Error Message when creating a planning view in EXCEL

    Hi everyone, after activating the planning Area I succesfully uploaded a sample of  time series, master data and key figure. I get the following error when I try to create a new planning view with my set of data in EXCEL. I am still waiting from the

  • How to call java implementations from C language

    How to call java implementations from C language.... I know using JNI java can call C code....is the converse also possible???? -Rams

  • Inventory Database not compatible

    We are running Zenworks 6.5 for Desktops. We want to start using Inventory. Everything is configured but when I go to view a workstation inventory or a query, I get a error message. "The configured database is not compatible database. You are trying

  • Can't add release key C90

    Apologies in advance if this issue has been covered. Obtained release via email from TAC..uploaded and installed TCNC7.3.0.8cb420c Diagnostics reports missing release key, click "add valid release key" ...field for adding release key nowhere to be se