# Fortran How to change data from linear scale to log scale

#### Amany Gouda

I am trying to calculate and draw a relation between (IL) and the Growth rate (m).
I have used Il as range from 10^15 to 10^18 in the calculation and when I draw the relation (x-axis ) is Il and (y-axis ) is m. I converted the IL to be in log scale.
I noticed unacceptable output.
So, I am going to repeat the calculation again by by using IL in log scale.
is there any mathematical relation can be used to make this conversion for IL.
Thank you

Related Programming and Computer Science News on Phys.org

Science Advisor
Homework Helper
Gold Member
"IL?"

#### Amany Gouda

IL: Laser intensity ranging from 10^15 to 10^18.

#### jbriggs444

Science Advisor
Homework Helper
I am trying to calculate and draw a relation between (IL) and the Growth rate (m).
I have used Il as range from 10^15 to 10^18 in the calculation and when I draw the relation (x-axis ) is Il and (y-axis ) is m. I converted the IL to be in log scale.
I noticed unacceptable output.
So, I am going to repeat the calculation again by by using IL in log scale.
is there any mathematical relation can be used to make this conversion for IL.
As I understand it, you have a data set of unknown origin which is a collection of ordered pairs: (IL, m). You have plotted this (a scatter graph?) and obtained a plot that is "unacceptable" for some reason.

You now want to re-scale the x axis on a log scale and you want to know a mathematical operation that can take an unscaled value for IL and convert it to a scaled value. So, for instance, 10^15 is represented as 15 and 10^18 is represented as 18.

What operations have you considered so far?

#### jtbell

Mentor
[I've put some of your words in boldface for emphasis.]
[...] I converted the IL to be in log scale.
I noticed unacceptable output.
So, I am going to repeat the calculation again by by using IL in log scale.
But you already converted IL to log scale? I think you should clarify this.

#### Leonid92

Hi all,
I have experimental data that obey mono- or biexponential behavior (without or with offset): I = I0*exp(-t/T2), I = I0*exp(-t/T2) + offset1, I = I1*exp(-t/T2_1)+I2*exp(-t/T2_2), I = I1*exp(-t/T2_1)+I2*exp(-t/T2_2) + offset2. I is intensity, t is time, T2, T2_1 and T2_2 are time constants. I1 and I2 reflect fractions of T2_1 and T2_2 components, respectively. I'd like to ask a question about plotting in semilog scale. What is the difference between plotting intensity on a log scale (and the horizontal axis is time) and plotting ln(intensity) vs time (ln - natural logarithm, or base "e" logarithm)? I don't understand the first one - plotting intensity on a log scale. I know that, for example, in Matlab there are functions loglog, semilogx, semilogy, but again, I don't understand, how they work. What mathematical formulas should I use to implement conversion from standard scale to semilogy scale (when y-axis is in log scale) if I want to do such conversion manually? Moreover, from the Matlab help for semilogy function: "semilogy(Y) creates a plot using a base 10 logarithmic scale for the y-axis and a linear scale for the x-axis". Why do they use base 10 logarithmic scale and not base "e" logarithmic scale? If I want to use semilogy function, but with "e" base logarithm (natural logarithm), how can I implement this, for example, in Matlab? On the other side, plotting ln(intensity) is clear, because in this case I just take natural logarithm of my original intensity values, and then plot these ln(intensity) vs time. I also found the site http://measurebiology.org/wiki/Understanding_log_plots, where topic is "Understanding log plots". On that site, authors show examples of plotting in log scale using Matlab. In the section "Linear vs. log scale", the authors wrote the following: "There are two ways to make a log-log plot in MATLAB. The first is to use the plot command to plot log(y) vs. log(x) on a linear scale.
plot( log10(x), log10(y))
Alternatively, you can use the loglog command to make a plot with log-scale axes:
loglog( x, y)"
Then they show corresponding graphs. These two plots look the same.

### Want to reply to this thread?

"How to change data from linear scale to log scale"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving