Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Logarithmic scale

  • 04-10-2007 9:54pm
    #1
    Registered Users, Registered Users 2 Posts: 2,593 ✭✭✭


    Ok, this is absolutely wrecking my head.

    Lets say we have an arbitary function (well array in this case), but anywho.

    f(x) is defined from 1 to T, T being the length of the array.

    I wanna figure out a function y(x) such that when I plot f(y(x)) with a logarithmic x-axis, it's going to look the same as plotting f(x) with a regular axis.

    that is to say I want y(T/2) to be halfway on the logarithmic scale..

    Hope that makes sense. Any suggestions??:confused:


Comments

  • Registered Users, Registered Users 2 Posts: 1,595 ✭✭✭MathsManiac


    For a start, I'm going to replace your function letter y with the letter g, because otherwise, I don't know how to refer to the vertical axis! Thus, in what follows, my "y" is the common or garden vertical y, and "g" is the function you're looking for.

    I assume you mean that you want the following:
    - The x-axis is going to be calibrated in such a way that, in base 10 for example, 100 is twice as far from the origin as 10.
    - The y-axis is going to be calibrated in an ordinary linear way
    - You want the graph y=f(g(x)) plotted against x on this diagram to look like the graph y=f(x) plotted against x on a regular diagram.

    [I'm going to ignore your assertion that you want g(T/2) to be halfway along the logarithmic axis, because that's not consistent with your initial assertion of what you want.]

    If I've correctly described what you mean, then what you need is just g(x)=log(x), where the log is taken to the same base as you're going to use for scaling the x-axis.

    Imagine lining up your two x-axes one above the other (an ordinary one and a logarithmic one), and say you're taking logs to base 10, and say T=4:

    0

    1
    2
    3
    4
    1
    10
    100
    1000
    10000---

    You want y=f(x) plotted using the top axis to be identical to y=f(g(x)) plotted using the bottom one.

    i.e., you want f(4) to be the same as f(g(10000)), and f(2) to be the same as f(g(100)), etc. Clearly, then, the function g=log(x) (to base 10) does the trick. Because then f(g(10000))=f(log(10000))=f(4), and so on.

    Hope that's clear.

    By the way, this strikes me as a rather bizarre thing that you're trying to achieve!!!


  • Registered Users, Registered Users 2 Posts: 2,593 ✭✭✭Sea Sharp


    Thanks man, got it.
    By the way, this strikes me as a rather bizarre thing that you're trying to achieve!!!

    It's for a sound filter that can produce arbitary Frequency spectrums.

    I wanna 'draw' a frequency spectrum on a linear axis. Well actually I wanna draw it on a logarithmic axis, so I'm using g(x) so that I can draw it on a linear axis then transfer it onto a logarithmic axis.


Advertisement