Labview equivalent to matlab filter function

Hi
I have a script In Matlab that is using the built-in filter function in matlab.
y = filter(B,A,x);
were x is the signal to be filtered and A/B is the filter coefficients.
Is there a labview function that gives my the same y as Matlab does if x, A and B is the same.
Best wishes 

sorry. I post some Matlab code and VI to demonstrate.
Matlab code:
clear;
x = 1:12;
A = [1 2 1 1];
B = [1 1 2 1];
y = filter(B,A,x)
%y =
%     1     1     4     2     8     0    17   -10    40   -45   107  -157
y2 = filter(B,A,x, [0 1 0]')
%y2 =
%     1     2     2     5     3     9     1    18    -9    41   -44   108
 and my VI is attached (screenshot). My Y is correct to the first filter call to matlab (y = y in both lw and matlab). And that is good. But the other call use a the vector Zi = [0 1 0] and from Matlabs help
[Y,Zf] = FILTER(B,A,X,Zi) gives access to initial and final
    conditions, Zi and Zf, of the delays.  Zi is a vector of length
    MAX(LENGTH(A),LENGTH(B))-1, or an array with the leading dimension 
    of size MAX(LENGTH(A),LENGTH(B))-1 and with remaining dimensions 
    matching those of X.
 Any idees how this can be done in LabView or what the Zi does in the Matlab implementation?
Message Edited by Tudor on 02-11-2010 09:29 AM
Attachments:
lw-filter.jpg ‏55 KB

Similar Messages

  • How to output data when converting labview vi into matlab mex functions

    Hi,
    I am a fairly new user to labview and am currently working on labview
    7.1. I have created a labview vi which can extract data from ni daq
    6070e in real time. The problem is that this code has to be converted
    so that it can be used with matlab.in order to do that i am using math
    interactive tool kit which converts the labview code into mex files
    which can then be used in matlab. Unfortunately i have not been able to
    figure out how to output this data so that it can be processed in
    matlab easily. i cannot afford any loss of information and all the
    output must happen in real time. the o/p must take place after the fft
    has been done. i am attaching the vi for convenience.There are 10
    broken wires ,and this is the place where i want the o/p to be
    generated.
    Also do let me know if this vi can be further improved.
    Regards
    Attachments:
    RT_loop2ver4_working.zip ‏642 KB

    Manuj,
    You seem to have misunderstood the way in which LabVIEW processes data.  The code that you have produced will run in exactly the same way without the need for the case structure.
    The code does not actually run the data from the previous case. It is merely processing data from the previous loop iteration, regardless of the case. If you were to remove the case structure, leaving only one copy of the code intact, and remove the toggle switch you have produced, or used the shift register which, I assure you would have worked, then you will have exactly the same functionality.
    I have attached an example that uses the shift register to toggle cases, but also iterates that the case structure is not needed by using the same feedback node (and code) without a toggle switch or case structure.
    Hope this helps you optimize your code
    Regards
    AdamB
    Applications Engineer
    National Instruments UK
    Applications Engineering Team Leader | National Instruments | UK & Ireland
    Attachments:
    CASE_NO-CASE_Example.vi ‏24 KB

  • Mathscript​/Matlab fir1 function vs. LabVIEW FIR coefficien​t?

    I'd like to convert some Matlab/LabVIEW Mathscript function into LabVIEW block functions, because it's faster.
    One of the function I'm not sure is the FIR function: I have a Mathscrip function fir1(n,W), is "FIR windowed coefficients" its LabVIEW equivalent?  If yes, how should I match the parameters (e.g. is W the high or low curoff frequency? is Order n the same as the number of taps)? If no, which LabVIEW function should I use?
    Thanks.

    Hi pji,
    I don't have LabVIEW, but I found some really useful resources in LabVIEW Help (open labVIEW>>Help>>search the LabVIEW Help>>search)
    Search for fir1 and it contains the syntax, paramter definition and some example codes which you can simply copy and paste and run
    b = fir1(n, w)
    n: Specifies the filter order. n is a nonnegative integer.
    n must be even for filters with a non-zero gain at the Nyquist
    frequency. If n does not meet this condition, LabVIEW increases
    n by 1.
    w: Specifies the cutoff frequency of the filter. w is real number
    between 0 and 1. 1 represents the Nyquist frequency.LabVIEW Help has abundant information, check it out!!!
    Van L
    NI Applications Engineer

  • Equivalent to calling a function in labview

    Hi,
    I don't use Labview regularly and would appreciate some advice for what is probably a straightforward problem! If I have one process started and running in a while loop, how can I start and run a second process in another while loop while simultaneously stopping the first while loop? For example, I have a button which when pressed turns on an indicator. When a second button is pressed the first indicator goes off and the second goes on simultaneously.
    Thanks for your help.

    Nested Loops?
    Edit to add: This is not the equivalent to calling a function like in C. The equavilant to calling a function in LV is to make a sub-vi. The sub-vi would be the same as a function. Place the sub-VI on another (higher level) block diagram and wire to it is like calling that function.

  • Labview equivalent of C pointer

    Dear All,
    In the Labview program, that I'm currently writting, I'm using a dll that was written in C. The C function I'm trying to call, is expecting a pointer to char in its prototype like so: void example(unsigned char *a); What is the Labview equivalent of a char *.
    Thanks in advance for your help,
    Regards,
    Alan

    There is a difference in passing a char type and a char array (string).  First of all, C expects the string to end with the NULL character (\0).  You need to append the NULL to the string, then convert the string to a byte array (String to Byte Array function).  Then in order to pass the array to the C DLL, you need to declare the parameter as Type=Array, Data Type=U8, Dimensions=1, Array Format=Array Data Pointer.  This will pass the string into the DLL.
    - tbob
    Inventor of the WORM Global
    Attachments:
    GetFirstFile.png ‏2 KB

  • Filter Function in Column Formula is not working properly

    Hi,
    I am using Filter Function in Column formula tab in Answers to calculate the Total sum from the start of the Fiscal month to the Month selected from the Prompt.
    My requirement is I have total sales column. Now I need to calculate TYYTD kind of thing for which I cant use the Time sereis due to my report constraint.
    Instead of that I am using this Filter function on TYYTD column where i am giving the filter as start of the Fiscal month to the month selected from the Prompt.
    For example if I select May month from the Prompt then this TYYTD column should give me SUM(Total Sales) between Feb and May for which I am using the Filter Function. But it giving me only May sales whcih is same as Total Sales column.
    Can anyone throw some light on this as this is very important for us or any alternate solution other than Time sereis measures.
    Did anyone got this kind of issue with Filter Function?
    Regards,
    Azad

    Ok...here's the steps to fix this as efficiently as possible.  I have a whole bunch of mailboxes under "On My Mac" and they have a bunch of mailboxes nested in them.  I get my messages into Apple Mail via IMAP.  (I don't know if this matters.)  The steps below assume you have a similar setup.
    1.  Hold the Option key down and click the dropdown arrow next to each mailbox that has one.  This will cause all nested mailboxes below it to appear.
    2.  Go to the top of the list of mailboxes under "On My Mac" and highlight the first mailbox.  Then hold the Shift key down and highlight the last mailbox in the list.  This will cause all of the mailboxes and nested mailboxes to be highlighted.
    3.  From the menu, select "Mailbox --> Rebuild" and the rebuild process will start.
    4.  Watch the top of the mail screen to see the message count change as the mailboxes are being rebuilt.  Wait until the activity stops before doing the next step.
    5.  As the mailboxes were rebuilt, many messages were reset as "Unread" even though every message was previously "Read."  Make sure the mailboxes you want to affect are still highlighted.  Right-click and select "Mark All Messages Read."
    That fixed the problem for me.

  • Filter Function problems on ALV report. [Resolved]

    Hi,
    I developed an ALV report by using function as below:
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
             EXPORTING
                  I_CALLBACK_PROGRAM = G_REPID
    *            I_CALLBACK_PF_STATUS_SET = status_set
    *            I_CALLBACK_USER_COMMAND  = USER_COMMAND
                  I_STRUCTURE_NAME = 'T_BSIK'
                  IS_LAYOUT        = GS_LAYOUT
                  IT_FIELDCAT      = GT_FIELDCAT[]
             TABLES
                  T_OUTTAB    = TAB_BSIK.
    And this ALV custom report is referenced from standard function FBL5N.
    After i completed this report, i made an comparision of FBL5N and my custom report.
    When I apply the filter function, for example, on the document type, I cannot input 2 characters in the document type field under the filter function. The field length is only 1 character. Similar case results on the field document date.
    While the standard function FBL5N works very nice.
    What should i do to make the filter function of my own ALV report as the same as the standard function FBL5N do?
    Thanks in advance.
    Lala
    Message was edited by:
            Hoo lala

    Oh, i found where the problem is...
    add below 2 statements, then the question is resolved.
      LS_FIELDCAT-ref_fieldname = ****
      LS_FIELDCAT-ref_tabname = ***
    FORM FIELDCAT_INIT tables RT_FIELDCAT.
    CLEAR LS_FIELDCAT.
      LS_FIELDCAT-COL_POS   =  3.
      LS_FIELDCAT-FIELDNAME = 'BLART'.
      LS_FIELDCAT-TABNAME   = 'TAB_BSIK'.
      LS_FIELDCAT-SELTEXT_L = 'Document Type'.
      LS_FIELDCAT-ref_fieldname = 'BLART'.
      LS_FIELDCAT-ref_tabname = 'BSIK'.
      APPEND LS_FIELDCAT TO  RT_FIELDCAT.
    endform.
    Fine now.
    Lala

  • How can i extend the filter function to also include an option to select which column to filter on?

    Hi.
    I have built an spry test-page (testing it on my localhost  so i cannot give you direct access to it) here i have an XML file that i show in an dynamic/ repeat table with 5 columns.
    I hvae included an spry filter function to easy filter out records, but the code only allows me to filter on one of the columns.
    I would like to add an extra "select-menu" to define which column the filter should be active for, how can i do that
    Here is the filter code and also the html code for the select-menu and the box to type in what to filter.
    The bold parts is the important parts, i would like the options values from the select menu to be inserted in the filterData function to be able to define which column to do the filtering on.
    var ds1 = new Spry.Data.XMLDataSet("report3.xml", "orders/order", {sortOnLoad: "@id", sortOrderOnLoad: "descending"});
    ds1.setColumnType("date", "date");
    ds1.setColumnType("BUTIKNR", "number");
    ds1.setColumnType("EXTRAFRAKT", "number");
    ds1.setColumnType("job/@idx", "number");
    var jobs = new Spry.Data.NestedXMLDataSet(ds1, "job");
    function FilterData()
        var tf = document.getElementById("filterTF");
        var menu = document.getElementById("searchIdent");
        if (!tf.value)
            // If the text field is empty, remove any filter
            // that is set on the data set.
            ds1.filter(null);
            return;
        // Set a filter on the data set that matches any row
        // that begins with the string in the text field.
        var regExpStr = tf.value;
        if (!document.getElementById("containsCB").checked)
            regExpStr = "^" + regExpStr;
        var regExp = new RegExp(regExpStr, "i");
        var filterFunc = function(ds, row, rowNumber)
            var str = row["@id"];
            if (str && str.search(regExp) != -1)
                return row;
            return null;
        ds1.filter(filterFunc);
    function StartFilterTimer()
        if (StartFilterTimer.timerID)
            clearTimeout(StartFilterTimer.timerID);
        StartFilterTimer.timerID = setTimeout(function() { StartFilterTimer.timerID = null; FilterData(); }, 100);
    html:
                <select name="searchIdent" size="1" id="searchIdent">
                    <option value="@id" selected="selected">ID</option>
                    <option value="date">DATUM</option>
                    <option value="time">TID</option>
                    <option value="BUTIKNR">BUTIK</option>
                    <option value="REF">REFERENS</option>
                  </select>
              <input type="text" id="filterTF" onkeyup="StartFilterTimer();" />
    Contains:
      <input type="checkbox" id="containsCB" /></td>
    Thanks in advance.
    //Rickard H

    Now it works, i had to do it like this:
        var filterFunc = function(ds, row, rowNumber)
            var str = row["@id"];
            if (str && str.search(regExp) != -1)
                return row;
            var str1 = row["date"];
            if (str1 && str1.search(regExp) != -1)
                return row;
            var str2 = row["time"];
            if (str2 && str2.search(regExp) != -1)
                return row;
            var str3 = row["BUTIKNR"];
            if (str3 && str3.search(regExp) != -1)
                return row;
            var str4 = row["REF"];
            if (str4 && str4.search(regExp) != -1)
                return row;
            return null;
    I also had to remove the line "ds1.setColumnType("BUTIKNR", "number");" from the code, otherwise it would not search at all (only searches string types?).

  • Using FILTER function in oracle answers

    Gurus,
    I have a question related to using Filter function in oracle answers.
    When trying to insert a Filter (expr) Using (expr) clause in the formula area of a fact table field, It errored out with msg saying about using a wrong measure.
    I know this can be done with a case expression but I tried filter clause since this is available in oracle answers.
    Please help me figuring out this scenario.
    Thanks.

    David / Raghu - Thanks for u'r replies and apologizes for not posting question with proper material.
    Am posting my code and the error message from the screen.
    Code :
    IFNULL(FILTER("Fact - MBS Loan Transactions"."OUTSTANDING PRINCIPAL" USING "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK" = 'HDC'),0)
    Error :
    nQSError: 10058] A general error has occurred. [nQSError: 22032] Function FILTER requires at least one measure attribute in its first argument. (HY000)
    SQL Issued: SELECT "Dim - MBS Loan"."LOAN AMOUNT", "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK", "Dim - MBS Loan"."LOAN TYPE SEN/SUB", "Dim - MBS Project"."PROJECT NAME", "Dim - MBS Project"."PROJECT NUMBER", "Fact - MBS Loan Transactions"."AR BALANCE INTEREST", "Fact - MBS Loan Transactions"."GL BALANCE INTEREST", IFNULL(FILTER("Fact - MBS Loan Transactions"."OUTSTANDING PRINCIPAL" USING "Dim - MBS Loan"."LOAN TYPE HPD/HDC/BNK" = 'HDC'),0) FROM "Financials - MBS"
    OK (Ignore Error)
    Please continue answering my queries. Since am a newbie your answers won't be just a reply but it's actually learning for me.
    Thanks.

  • About the filter function in OBIEE 11g

    Hi, all.
    when i use the filter function in OBIEE 11g, it turn out a wrong result.
    The operation steps and detail are described as follow:
    1. In the Column Formula pane, I typed the Formula of the column 'count of customer' as:
    FILTER(count(distinct("customer info dimesion"."customerID")) USING ("TradeType Dimesion"."TradeType" = '001'))
    2. But the phisical SQL about this column in the NQquery file is that: "count(distinct(T11520.CUSTOMERID)) as c5, "
    which means that, the filter wasn't applied, right?
    If so, what shall I do in this situation, in other words , how can i make a Condition COUNT?
    Any Suggestion is appreciated!
    Thank you in advance~~O(∩_∩)O~

    Hi katherine,
    FILTER(count(distinct("customer info dimesion"."customerID")) USING ("TradeType Dimesion"."TradeType" = '001'))I think your formula there is mistake like many braces...instead type this in your f(x)
    =>Filter(count(distinct customer_id) USING trade type='001')
    This filter function is same like a case statement,if you filter still gives error write a case statement
    CASE WHEN TradeType Dimesion.TradeType='001' THEN count(distinct customer info dimesion.customerID) ELSE 0 END
    Will it be helpful?,follow this etiquette http://forums.oracle.com/forums/ann.jspa?annID=939
    By,
    KK

  • There is no filter function in numbers for ipad,its very discouraging,as a ipad fan,even nokia lumia providing filter in there low cost mobile

    there is no filter function in numbers for ipad,its very discouraging,as a ipad fan,even nokia lumia providing filter function in excel in there low cost mobile.
    APPLE KINDLY PROVIDE THIS FEATURE AS UPDATE SOON,COZ I WORK ON EXCEL N NUMBERS IN MY IPAD IS DEAD WITH OUT FILTER FUNCTION,I CAN NOT TRAVEL WITH MY IPAD DUE TO THIS REASON,AS I HAVE TO BE IN FIELD WITH SALES FORCE SO I BOUGHT IPAD.

    Probably you know that the new version of Numbers for iOS uses the filters created in the Numbers for Mac version.
    It's not the best solution but it helps (of course, if you have a Mac!)

  • Filter function causing 0 items in combo box

    HI there, I have combobox with the dataProvider set up like below
        <mx:ComboBox rowCount="10" id="selectUser" 
                        dataProvider="{VO.getInstance().clientsResultForAddTrade}" width="258"
                        x="28" y="10" >        
                    </mx:ComboBox>
    in the VO class I have some code that calls the filter function (when clientsResultForAddTrade is refreshed in the clientsDataChangeHandler) when the clientsResultForAddTrade data changes.
          private function clientsDataChangeHandler( event:PropertyChangeEvent ):void{
               clientsResultForAddTrade.refresh();
            public function VO(caller:Function=null)
                if (caller != VO.getInstance)
                    throw new Error("Singleton is a singleton class, use getInstance() instead");
                if (VO.instance != null)
                    throw new Error("Only one Singleton instance should be instantiated");
                //put instantiation code here
                clientsResultForAddTrade.filterFunction = clientAuthorisedFilterFunction;
                 activityWatcher = ChangeWatcher.watch( this, "clientsResultForAddTrade", clientsDataChangeHandler);
                private function clientAuthorisedFilterFunction(item:Object):Boolean
                    var b:Boolean =  item.status == 'Authorised';
                    return item.status == 'Authorised';
    However there are 0 items in the selectUser combobox after the filter function is called, I have checked that it returns true when item.status == 'Authorised'
    Please advise, 10 points available

    Could it be a problem with the way I assign the data in the first place?
    private function handleGetClients(event:ResultEvent):void
                    VO.getInstance().clientsResult=event.result as ArrayCollection;
                    //the following has a filter function in the model that automaticly refreshes
                    VO.getInstance().clientsResultForAddTrade.source = (event.result as ArrayCollection).source;

  • Is it possible to create a filter function in Muse?

    I was wondering how to create a filter function in Adobe muse. I need this for a website that rents B&B´s, Agriturismo and some other stuff. I would like to have this filter where people have search options.
    Michiel

    Hi Hans,
    I mean a filter for searching in your website. I give you a website and you see what I mean. I think i have to make a database for this to work.
    www.vivere-e-gustare.com. Here you find on the left top a search engine to fill in your wishes about what you are looking for. I hope I made myself clear.
    Thank you
    Verzonden met Windows Mail
    Van: hans-g.
    Verzonden: donderdag 29 mei 2014 10:08
    Aan: michiel brouwer
    Is it possible to create a filter function in Muse?
    created by hans-g. in Help with using Adobe Muse CC - View the full discussion 
    Hello,
    in which area "people" should have search options? About your whole website, in a menu or, or ...
    To be not left empty-handed  here some links:
    http://helpx.adobe.com/muse/tutorials/building-your-first-website-part-7.html  >>> how to filter the items in the menu list ...
    http://helpx.adobe.com/muse/tutorials/creating-mobile-layout-designs-muse-2.html  >>> Adding links with the Links menu
    Hans-Günter
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6417713#6417713
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Help with using Adobe Muse CC by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Missing the filter function in the new version of Spotify? Come over here.

    Hi folks,
    Many of you have requested we re-add an option to filter from artist, album and playlist pages in Spotify. We're considering this feature for newer versions of the application but we're investigating the best solution. Therefore, we have a question which will help us make this feature even better than before:
    What did you mainly use the filter function in Spotify for? 
    Please reply to this thread with your answer.

    @Spotify What sort of kind of question is this? Are you implying that no one at Spotify has a basic understanding of usability? It sure seems like it. First, I have to ask why would Spotify ever remove a feature that is in active use? Second, why do the product managers/developers at Spotify not understand the existing use of "find" or "filter"? The reason this feature was put into the product is the reason it should stay in the product. This sort of functionality has existed in computer interfaces for decades. Visual search (i.e. having a human being visually scan every item manually) is very slow and prone to error. When there is more than a little information on the screen, having the computer search for the human is much more efficient and less prone to error. I would suggest everyone at Spotify get as much remedial education as possible in usability. Here's a place to start: What — Definition of UsabilityUsability is a quality attribute that assesses how easy user interfaces are to use. The word "usability" also refers to methods for improving ease-of-use during the design process.Usability is defined by 5 quality components:Learnability: How easy is it for users to accomplish basic tasks the first time they encounter the design?Efficiency: Once users have learned the design, how quickly can they perform tasks?Memorability: When users return to the design after a period of not using it, how easily can they reestablish proficiency?Errors: How many errors do users make, how severe are these errors, and how easily can they recover from the errors?Satisfaction: How pleasant is it to use the design?There are many other important quality attributes. A key one is utility, which refers to the design's functionality: Does it do what users need?Usability and utility are equally important and together determine whether something is useful: It matters little that something is easy if it's not what you want. It's also no good if the system can hypothetically do what you want, but you can't make it happen because the user interface is too difficult. To study a design's utility, you can use the same user research methods that improve usability.Definition: Utility = whether it provides the features you need.Definition: Usability = how easy & pleasant these features are to use.Definition: Useful = usability + utility.Even using these basic principles, it is easy to see the reasons that Ctrl/Cmd-F should be put back into the product. Measure how long it takes users to find music on a long playlist or long search results page without Ctrl/Cmd-F. And then measure with it. The only failures with the original design of find/filter were (a) that it was less discoverable than it should be in the GUI, i.e. no GUI icon cue and (b) it didn't filter/find using substrings very well or at all. It pains me be a customer of a company where the original wisdom of the people who built the UI of the v0.8.5 client (and previous versions) has apparently been flushed down the drain.  

  • Problem with Filter function in bubbleSeries

    Hi,
    I have a bubbleSeries. Its dataprovider has item values having both blank('') and negative values. I don't want to show such values, hence I have used a filter function in which a check is made and adds those items which are valid.
    I have data for various years so I have used interpolation effect.
    While playing the animation or viewing data for different time series, a small bubble is displayed on top-left corner of the chart which is not part of the valid data.
    If I dont use a filter function, I dont get this small bubble on top-left corner. But as per my requirements, I need to have a filter function.
    Please help me in guiding through the reason of such behavior of filter function.
    Thanks,
    Tanu

    Hi Gregory,
    Please find below the sample code which shows a small bubble on top-left corner when animation is played. We need to click on "play" button to start the animation and "stop" button to stop the same.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   minWidth="955" minHeight="600"
                   creationComplete="init()" >
        <fx:Declarations>
           <mx:SeriesInterpolate id="seriesEffect" duration="1000"  easingFunction="Linear.easeIn"/>
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.charts.series.items.BubbleSeriesItem;
                import mx.collections.ArrayCollection;
                import mx.effects.easing.*;
                import mx.events.FlexEvent;
                private var oTimer:Timer =  new Timer(1000);
                private var currentDp:int = 1;
                [Bindable]
                public var expenses1:ArrayCollection = new ArrayCollection([          
                    { Profit:10, Expenses:10, Amount:''},
                    { Profit:'', Expenses:50, Amount:''},
                    { Profit:'', Expenses:41.6, Amount:''},              
                    { Profit:'', Expenses:43.6, Amount:''},
                    { Profit:'', Expenses:86, Amount:''},
                    { Profit:'', Expenses:11.4, Amount:''},              
                    { Profit:'', Expenses:99.2, Amount:''},
                    { Profit:'', Expenses:12.8, Amount:''},
                    { Profit:'', Expenses:'', Amount:10}
                [Bindable]
                public var expenses2:ArrayCollection = new ArrayCollection([
                    { Profit:30, Expenses:'', Amount:10},
                    { Profit:95, Expenses:-90, Amount:50},
                    { Profit:20, Expenses:60, Amount:23},
                    { Profit:67, Expenses:'', Amount:56},
                    { Profit:-23, Expenses:56, Amount:34},
                    { Profit:30, Expenses:'', Amount:10},      
                    { Profit:95, Expenses:-90, Amount:50},
                    { Profit:70, Expenses:30, Amount:93},
                    { Profit:22, Expenses:'', Amount:10}      
                private function init():void
                    oTimer.addEventListener(TimerEvent.TIMER,onTick);
                    bubbleSeries.dataProvider = expenses1;
               public function onTick(event:TimerEvent):void
                    if(currentDp == 1)
                        bubbleSeries.dataProvider = expenses2;
                        currentDp = 2;
                    else
                        bubbleSeries.dataProvider = expenses1;
                        currentDp = 1;
                private function clickHandler():void
                    oTimer.start();
               public function myFilterFunction(cache:Array):Array
                    var filteredCache:Array=[];
                    var n:int = cache.length;
                    for(var i:int = 0; i < n; i++)
                        var isValid:Boolean = true;
                        var bubbleSeriesItem:BubbleSeriesItem = BubbleSeriesItem(cache[i]);
                        if( bubbleSeriesItem.item.Profit == "" || bubbleSeriesItem.item.Expenses == "" || bubbleSeriesItem.item.Amount == "")
                            isValid= false;
                        if(isValid)              
                            filteredCache.push(bubbleSeriesItem);                   
                    return filteredCache;
            ]]>
        </fx:Script>
        <mx:Button x="10" label="Play" click="clickHandler()"/>
        <mx:Button x="250" label="stop" click="{oTimer.stop()}"/>      
        <mx:VBox x="10" y="100" width="80%" height="70%" label="Bubble" >      
            <mx:BubbleChart id="bubbleChart" width="100%" height="100%" showDataTips="true"
                            minRadius="5" maxRadius="15">
                <mx:series>
                    <mx:BubbleSeries  id="bubbleSeries"
                                      showDataEffect="{seriesEffect}"
                                      xField="Profit" yField="Expenses" radiusField="Amount"
                                      filterFunction="myFilterFunction"
                                      />
                </mx:series>
                <mx:horizontalAxis>
                    <mx:LinearAxis id="horLinAxis"  minimum="-100" maximum="100" />      
                </mx:horizontalAxis>
                <mx:verticalAxis>
                    <mx:LinearAxis id="verLinAxis" minimum="-100" maximum="100" />
                </mx:verticalAxis>
            </mx:BubbleChart>
        </mx:VBox>
    </s:Application>
    Please help.
    Thanks,
    Tanu

Maybe you are looking for

  • I think my airport express is dead but I dont know...help!

    hi there on thursday night, i did a number of software updates (unrelated to airport express). anyway, on friday the airport express went down, so i thought that was simply some kind of software update, reset the computer but nothing worked. so i hav

  • 7390 screen

    hi i have been in posession of a 7390 for a while i believe it to be a very good phone but i have been having problems with the screen it suddenly went like a television screen and went all fuzzy and i cannot use the phone now it is there anything i

  • How to convert the report english to germany in abap

    Hi guys, How to convert the report english to germany in abap and any manual code or function module. please give the solution.

  • Convert to c#

    Hi All. How to convert from VB to C# ABCTableAdapter.Fill(CtrlDataSet1.DuplP, Emp_Id, TextBox1.Text, Duplicate) and Me.TextBox1.ToolTip = "The Emp # - " & EmpDuplSource.View.CurrentItem("Emp_No") & " duplicated." Thanks.

  • How to know what database components have been installed on my database?

    How to know what database components that have been installed on my database using SQL*PLUS tool? (10g 10.2.0) Edited by: frank.qian on Nov 8, 2008 10:55 PM