Series R FPGA, calculate log base 10 number > = 1

Hi all

I'm stuck on a problem with the calculation of a log base 10 of a number greater than 1.  It seems that natural logarithm in the high throughput math library is limited to the range of 1/1.  There must be others who need to work outside this range - how do we?

Thank you

George

Hey gharris,.

The only way I know to do this is through lookup tables.

You want to probably use BlockRAM and use VI initialization, as described here. You also have a table of logarithms, which covers the range that you expect to encounter. For values outside of your table, you'll need to interpolate.

To get this right for your application may take a bit of tweaking, especially if you have a tight deadline or a need for high precision.

Tags: NI Software

Similar Questions

  • Javascript EA - calculate log() base 10?


    I am writing an algorithm to calculate the value and the graduations on the y-axis of a dynamic chart.

    For the calculation, the cleanest way, I need to be able to calculate a log() with a base of 10.

    JavaScript has a logarithmic base-10 - Math.log10 - function as a constant - Math.LN10 - and to open a session can be calculated for any base - Math.log (number, base). Unfortunately, none of them seem to work in version Edge lead CC of javascript.

    Can someone tell me how to get the log of a number in base 10 on board animate CC?

    TIA,

    Carolyn

    You should have regular access to all javascript mathematical functions on the edge. I tried the ones you mention and they return the correct values. Outside Math.log (number, base) which I have never seen elsewhere. The following should work as well:

    function getBaseLog (num, base) {}

    return Math.log (y) / Math.log (x);

    }

    Math.log - JavaScript | DND

    There may be another error in your code - what results you get if you write in the console?

  • Calculation of log base 2 of 35 s new

    I would like to calculate the necessary resolution for an ADC with analog input will accept a +/-10V swing with a background noise of 0.4mV. The counties of RMS are 20.0V/0.0004V = 50 000 points - just easy. To set the 50 000 RMS number of bits is: bits = log2 (50,000). How can I make my new imagination 35 s to calculate log base 2 of 50 000? Help is appreciated - thanks.

    Hello

    To calculate LOG2(A) use LOG (A) / log (2) or LN (A) /LN (2).

    Here is a program to do this (run in RPN mode):

    To use, type number and XEQ, then, ENTERED.

    HTH

  • Series LOG (base 10)

    Hi all

    I'm embarrassed to ask this, but I know not all math, I used to know.  I want to create a series of N points of X to Y, with an increase of NEWSPAPER, and Yes, I implement it in LabVIEW (7.1, please post a picture instead of a VI if you want to see an example).  I started with LOG(Y/X)/n and adding tried various additions, multiplications, etc. but I can't understand this.  Would be it someone please let me know the correct calculation?  Thank you!

    Michael Tracy

    Synergy microwave

  • Impossible to check the FPGA reference with "not a number/path/Refnum?

    How can I check if an FPGA interface refnum is valid?  It seems (LabVIEW 2009) that "Not a number/path/Refnum?" always returns true when connected to the output of open FPGA VI reference.  I write code that needs to be able to run without an FPGA for testing purposes, so I wrapped all calls to the FPGA in a case structure that I thought would run only if the FPGA reference is valid.  Turns out that they run ever, even when the FPGA reference is valid (probe shows it has a numerical value, and the FPGA VI is running).  I guess it's sort of similar to semaphore and appointment of references that have their own special function to verify the validity, but I do not see such a function for FPGA.  I have to cast to int and check if it is not equal to zero?


  • calculate the base on a mc on a mc

    Hey people,

    I have a running total. When a mc hits the table or hand it will adjust the total. The problem is that I want only the total in order to take into account when an object is placed on the mc of the hand. If I remove something from him, delete its value altogether. Now to be smart I have add when a mc hits the hand and remove a value if a mc hits the table. The problem, if I never touch the hand and continue to drop the mcs on the table, I get a negative value. Is there a way to calculate a total only when a mc is based on the mc of the hand and remove the appropriate otherwise value on that?

    This error does not seem to relate to your metering code.  It indicates that a function you have expects an argument to be passed to it, and no argument is passed.  Go to your publication settings and select the option to enable debugging.  The messade of error can then include the line number where the problem arises.

  • PCIe-7842R (series R FPGA) digital output does not work properly

    Greetings,

    I'm having some problem show TTL the correct voltage with my PCIe-7842R FPGA board.

    The block diagram of my code FPGA LV Moose appears in "analog - digital .png '. The idea was to convert an analog input (decimal value) to a binary code and 16-bit output by 16 DIO ports. I use the connection block SCB-68 has as the terminal and trendy on the FPGA 1 connector RDIO with SHC68-68-RDIO shielded cable.

    The compiled code ok. But during the test, I noticed that some ports has no output TTL levels correctly. For example, for input 1000 decimal, I would expect binary code 0000001111101000. However, some ports (DIO #6, #7, #9, etc.), which are supposed to ~3.3V (1 digital) high TTL output, output actually 0.8V. I have attached the result measured in 'exit digital test.png '.

    To ensure that the question was not because of the code of the LV, I did some more tests on DIO #6 with a simple example (simple digital output.png). The output was ~ 1V this time at the digital 1.

    It's really confusing because of the digital Edition is supposed to be simple. I used the same FPGA card for controlling roller shutters with TTL signals before and it worked fine.

    Does anyone have similar problems? Any suggestions are greatly appreciated.

    iron_curtain wrote:

    DIOs are connected to a controller digital galvo Cambridge Tech. But I measured the voltage at the terminals of the connector block.

    If you unplug the controller galvo DIOs, do they look good (have the right voltages).  Do you know how many of these entries to the need for controller?  I think you hit the limit the total current available for EID within the Council.

  • How can I calculate all the perfect number up to 10000?

    I used Quotient and remainder vi but am still not able to VI of this... Please give me the solution

    I understand that the problem is 2 times. You will need to do a factorization of a number and then summarize these factors to see if adds the number of original, right?

    Therefore a loop, to quote and assistance from rest to build a table of factors (the input value must be staggered and recalculated when you find a factor), then do a sum of table and compare it to the value of the moose. Sounds fair? The perfect numbers should ofc build a picture of themselves, which is easily done in the external/next loop.

    For any number, just do an outer loop around the whole shebang and feed it with the meter of the loop. If the internal test is true, adds to the table and you will have a table with all perfect numbers.

    /Y

  • vmware var log base file

    Hello

    Trying to do a cleaning on our box ESX3.  There are a lot of old log files accumulate so we removed most of them.  Can someone explain the "core" file/s in/var/log/vmware /?  There are much more like core.1234, core.8793 etc and we are not really sure what they are since then, except that they were 2007 unlike the one below;

    # ls - lh, / var/log/vmware

    total of 206 M

    -rw - 1 root root 163M 13 April 2009 core

    service console core dumps unannounced? You can remove...

    Duncan

    VMware communities user moderator | VCP | VCDX

    -

  • Update field table to the base sequence number another field

    Hello

    I have the following structure:

    create the table from_list
    *(*
    NR_ID NUMBER of non-null,
    EX_ID NUMBER of non-null,
    NUMBER OF OE_ID
    *);*

    insert into from_list (NR_ID, EX_ID, OE_ID)
    Select 1, 1, null of union double
    Select 1, 1, 1 double Union
    Select 1, 2, 3 double Union
    Select 1, 2, 4 double Union
    Select option 1, 2, null of union double
    Select 2, 1, null of union double
    Select 2, 1, null of union double
    Select 3, 10, double null.

    commit;

    Thus,.

    Select go t from_list
    order of t.nr_id, t.ex_id, t.oe_id


    NR_ID EX_ID OE_ID
    1-1-1
    1 1
    1 2 3
    1 2 4
    1 2
    2 1
    3 10

    I need to change the field value OE_ID null records and for each NR_ID, the EX_ID and the next OE_ID.

    With the above data, the result would be:

    NR_ID EX_ID OE_ID
    1-1-1
    1 1 2
    1 2 3
    1 2 4
    1 2 5
    2-1-1
    3-10-1

    Thank you.

    The only thing I will add to the post of Warren is an additional sorting or two.

    The collation that is used with the ROW_NUMBER function is not deterministic: in other words, he does not want to break all the possible links. In his case, the code worked, but, when you do not use a deterministic sort, then you let the tierbreaking randomly. There is never a guarantee that Oracle will sort it the same way every time.

    Thus the ORDER BY in the analytical ROW_NUMBER() function must reference all three columns.

    Here's how you need to change line 3 since its first solution:

    ROW_NUMBER() OVER (PARTITION BY nr_id ORDER BY nr_id, ex_id, oe_id) oe_id
    

    In the second solution, change fit in line 4

  • Calculate/sort by the number of pixels

    It seems to be a simple thing, but I couldn't find any plugin or script to do this. Is this possible? It would be very useful for many of us who sell images online.

    THX/Anna

    www.ayimages.com

    Check your PM Inbox ;-}

  • CS3, CS4 and CS5 Crash when clicking on.

    Hey, can't find anywhere better ask this question.

    2.8gz 4 GB ram imac running intel latest snow leopard.

    have all 3 installed indesign cs3.cs4.c5 tests.

    However as soon as the start screen has authorized, we arrive at the new document window.

    We can choose document settings, then the page is displayed in white as standard.

    then you click ANYWHERE in indesign and Flash freeze and have to force quit.

    all n software drivers are up to date and have erased the prefrences.

    any guy more ideas?

    see you soon

    x

    Well.

    Sometimes it's obvious what's going on, but usually it is not. In this case it isn't. But.

    I guess we can say that he is waiting for the system to grant him a lock to do something, but this isn't all that clear what who or why. Although it seems to be stuck inside the TIN_Disposefont in calls to SING. I don't know anything about TIN, other than a look of 5 seconds on his web page.

    But it seems that the problem has to do with fonts and Japanese who. I think that Peter above suggests that a font may be a problem.

    So, try to remove all of your Japanese fonts. And if that does not do it, try to delete all your rules policies. See if that fixes it. If so, then add their return in half until what refine you the one who kills. Don't forget, it's only log-base 2 number of fonts, so even if you have 1024 fonts on your system, it is only 10 demi-retrecissements.

  • Z10 number call log blackBerry unknown?

    Hello. Can someone please help, when I click on the phone on the z10 that shows you all your logs there unknown number right at the top and below there my BlackBerry. I want to change that on my number but I do not know how? Display my phone number is already checked, which is for when you call people. Someone else has had this problem and fixed it? I've seen people say that you need to change it on the SIM but how do you still find your SIM on the z10?

    Hi BB10User,

    Welcome to the support community!

    You should be able to locate your SIM card settings by using the search feature. Once there, you should have the ability to change the phone number. If this does not help, I suggest contacting your mobile phone provider so that this feature is enabled in the BlackBerry smartphone pulls the phone number of the SIM card. If the information is not met on the SIM card, the number appears as unknown.

    Let me know if this helps.

  • How to calculate the 99th percentile of a stream of number...

    Environment:

    Oracle 11.2.0.3 EE on Solaris 10.5

    I have a stream of numbers (for example 1000), I need to calculate the 99th percentile of the distribution of this stream in such a way that when a new ' number is introduced, I can tell if the new number is above the 99th percentile of the distribution of my workflow.

    I don't have a good idea of the nature of the distribution if it's important.

    I am NOT, I repeat NOT a statistician! :-)

    I read the docs on the different functions available, ntile, percent_rank, percentile_cont, percentile_disc, etc. I also read a lot of articles referenced via Google.

    The examples are not exactly what I'm trying and I was unable to get the result I need by trial and error (mostly!).

    All suggestions are welcome!

    If you need additional information, I will try to provide what I know.

    -gary

    Hi, Gary.

    garywicke wrote:
    Hi Frank

    Well to try to facilitate the description of periods, I managed to confuse the issue a little more.

    Sorry about that.

    I need to use days not months. The script will be executed every day and watch period of ago 210 days to 31 days following there from 30 days at present.

    With respect to the expected result, I need somehow calculate what turnover represents the 99th percentile (or 90th everything that works in the example) and store that in my table of this customer.

    Then after a CREATE TABLE statement for this table and you want that it contains, given the data published in the sales table, after it is filled.

    Another process on the whole will consider the last average of 30 days and determine if this average exceeds sales 99th percentile figure and initiate an action (alert email, etc.) if it is.

    My problem is that I don't know how to calculate this 99th percentile number.

    After the sample data, I'm guessing it should be close to the number of SD 3, but after reading your comments, maybe that's not correct.

    That's my guess. Sometimes deviations corresponding to percentiles, sometimes they did not. People choose one or the other, depending on what amounts to their data, and what they want to show on these data. Your client has apparently chosen percentile. Unfortunately, we do not seem to know something about the problem.
    Before you can solve this problem for your customer, you must understand what the problem is. Talk to your client and know exactly what is wanted here.

    Here is one possible approach.

    WITH     got_month_avg     AS
    (
         SELECT       custno
         ,       AVG (amount)     AS month_avg
         FROM       sales
         WHERE       tran_dt     >  SYSDATE - 30
         AND       tran_dt     <= SYSDATE
         GROUP BY  custno
    )
    ,     got_threshold_amount     AS
    (
         SELECT DISTINCT
              custno
         ,     PERCENTILE_CONT (.4)          -- or .99
                  WITHIN GROUP (ORDER BY  amount)
                            OVER ( PARTITION BY  custno )          AS threshold_amount
         FROM    sales
         WHERE     tran_dt     >  SYSDATE - 210
         AND     tran_dt <= SYSDATE -  30
    )
    SELECT       a.custno
    ,       a.month_avg
    ,       t.threshold_amount
    FROM       got_month_avg          a
    JOIN       got_threshold_amount  t  ON  t.custno  = a.custno
    --WHERE       a.month_avg     >= threshold_amount
    ORDER BY  custno
    ;
    

    Output:

    `   CUSTNO  MONTH_AVG THRESHOLD_AMOUNT
    ---------- ---------- ----------------
             5      126.5           4812.6
            26 4602.44444           3102.2
    

    I set the WHERE clause comment, just so that we could see the results of each custno. I also put the extremely low threshold (40th percentile) just for a custono would be selected if you are not using the WHERE clause.

    Subqueries are average in the last 30 days and the 40th percentile for 180 days before that. Let's take a look at custno = 5. There were two rows in the last 30 days (225 and 28 amounts), then the average in the last month is (225 + 28) / 2 = 253 / 2 = 126,5.
    Within 180 days prior to that, he had 7 amounts, in ascending order:
    1st (0th percentile): 647
    2nd (17th percentile): 1869
    3rd (33rd percentile): 3065
    4th (50th percentile): 7434
    5th (67th percentile): 8435
    6th (83rd percentile): 9393
    7th (100th percentile): 9712
    Since (for now), we are interested in the 40th percentile. It will be more than number 3065 (33rd percentile) and less than 7434 (50th percentile), 3065 to 7434, somewhat 40% being somewhat closer than 33% to 50%. This number turns out to be 4812.6.

  • Find phone corresponding to Archive log number

    Hello


    The Setup is an Oracle 10 g on solaris 10 Server and connect its archives in mode. It is a development facility

    The log directory archive now contains archives of the creation of the database data. All schemas containing data have been deleted, and re-created by expdp use 3 - 4 times so far for the purposes of data updating, however there is no record of the date of discounting.

    I'm assuming that logs archiving before the re-creation of diagrams will not be used.

    is it possible to identify a number of newspaper archive, so that I can delete all archive logs before this number.


    Please share your advice on that.

    Hello
    I'm assuming that logs archiving before the re-creation of diagrams will not be used.
    As far as I know, no, there is no way. but you have another option.
    1 take the backup of the database now and delete all logs to archive before backup.

    Kind regards
    Taj

Maybe you are looking for

  • How can I change my 32 bit Firefox v40 install 64-bit?

    My Firefox install not work always 32 bits 64 as I want. I was even able to automatic update, something I have never done with software, but still no joy. Windows 7 + sp1 soon, I hope, and I think that upgrade from Windows 10.

  • about stored user name and password on the XP computer

    HelloI have a question about stored username and password on XP pro computer.If you go into control panel - user - accounts select the account name and there is an option to click on manage my network passwords.I have this computer from someone and I

  • Windows Vista Server Log-on the question

    When I try to log on to a file server, I get the user name and password window. My computer Windows Vista keeps adding the name of account before the user name when I click the OK button to open a session. Of course, it then then tells me I have the

  • Crahes in Windows mode 'sleep'.

    I have a Dell studio XPS under Vista 64.  When the computer asleep often but not always doesn't wake up.  When I try to wake up to touch the keyboard or the mouse, I get a blank screen.  The computer does not respond.  I can wake him up by pushing th

  • VPN - IPSec remote access

    Hi community support. I have an ASA with double tis (gig0/0-gig0/1) and gig0/1 has a default route with admin distance from 254 to back it up. I just created Cisco Anyconnect on the SAA the wizard and I can connect to both interfaces. IPSec tunnel co