Results 1 to 5 of 5
  1. #1
    monika is offline Member
    Join Date
    Mar 2010
    Posts
    15
    Rep Power
    0

    Default Converting value of array to log

    Hi
    can anyone tell me how to convert the value of an array into logarithm value base 10.
    If I have an array like
    double[] x={2,2,3,4}

    I want it like
    x={0.301,0.301,0.477,0.6}

    thank you

  2. #2
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    283
    Rep Power
    6

    Default

    Math.log10 should solve your purpose.
    Swastik

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  4. #4
    monika is offline Member
    Join Date
    Mar 2010
    Posts
    15
    Rep Power
    0

    Default

    Thank you.
    With your help I have solved it

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. converting 1D array to 2D for JTable
    By phil128 in forum AWT / Swing
    Replies: 1
    Last Post: 03-12-2009, 01:08 PM
  2. Converting ArrayList to Array
    By vasavi.singh in forum New To Java
    Replies: 1
    Last Post: 02-23-2009, 03:34 PM
  3. Converting a String into a array.
    By taraxgoesxboom in forum New To Java
    Replies: 12
    Last Post: 02-22-2009, 06:29 AM
  4. Converting ArrayList to Array
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-13-2007, 11:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •