# calculation of semilog line

Hi could someone tell me how to calculate the Y I'm asking.

Thx
###### Who is Participating?

Commented:
I get 0.8265 too
Perhaps you do not have a straight line on a semi-log plot.
0

Commented:
Semi-log generally refers to the axes of the graph, and on the log axis, 0 would be infinitely far away, so the the graph you have drawn  is not semi-log

And labeling only two points is not enough to determine the equation of the red curve, since there are an infinite number of curves that match those two points.
0

Author Commented:
thx for quick reply,  my graph will never go to 0 so it is not the case here but thx for the heads up.

you are right, I realized after your post when I drew that graphic, I didn't use logarithm on Y axis.
and if I use it won't help me on what I need to do.

So what is the way of doing this? what I need?  I mean on linear grahic, how to calculate semilog line (it is semilog confirmed) :) based on given points.

Thx
0

Commented:
Your x axis does not appear to be linear. If it were your question could be answered.
I find it hard to understand a curve labeled linear plotted on a graph with no linear scale
You can get an approximation if you assume the x axis between the last two labeled points on the linear scale is linear.
y = 3.6
0

Author Commented:
dear abur,

X is linear it start from 0 ...  ends at 10000 and increases 1 on each point
and ~3.62376 is the number i  should get (it is estimated like yours) so I'm sure the formula you used is the one i need, may i get the formula please?

thx
0

Commented:
Label the three known points 1, 2, 3.

then the required y is obtained by solving

y2 - y3 divided by a measurement off your graph of the vertical distance between points 2 and 3.
this number is set equal to the desired y divided by the measured distance on your graph of the vertical distance between the ? point and point 3.
-
I measured the required distances off my computer screen. the scale factor between your graph and my screen cancels out.
0

Commented:
a straight line on a semi-log graph would have the form log(y) = a+b*x
so solving for a and b given
log(7.71695) = a+b*1
log(5.0999) = a+b*191
gives
log(y)=2.04559919918196 - 0.00217999092925162*x
so
log(3.62176818616628) = 2.04559919918196 - 0.00217999092925162*348
0

Author Commented:
@aburr => I'm sorry but having trouble to following you could you give me a direct formula?
@ozo => thx a lot last favor, could you show write me step by step how did you get the conclusion

log(7.71695) = a+b*1
log(5.0999) = a+b*191
gives
log(y) = 2.04559919918196 - 0.00217999092925162 * x

thx...
0

Commented:

log(5.0999) = a+b*191
-
log(7.71695) = a+b*1
log(5.0999)-log(7.71695) = (a-a) + b*(191-1)

(log(5.0999)-log(7.71695)) / (191-1) = b

log(7.71695) - b*1 = a
0

Commented:
There is no direct formula because my method required two measurements taken off you graph. I used physical measurements because there were difficulties with you graphing.
-
Ozo assumed that your points would form a straight line on a true semi-log plot. A straight line has an equation like z = bx + a, He solve two equations (from your two known points) and used the a and b to calculate the coords of the third point. His answer of 3.62176818616628 (the same as mine but with more decimals) shows that his assumption is likely correct. And that my assumption of linearity in the drawing was not too far off either.
0

Author Commented:
@ozo: so based on what I understood the below is the formula will be

log(y1)=a+b*x1
log(y2)=a+b*x2
log(y2)-log(y1)=(a-a)+b*(191-1)
b=(log(y2)-log(y1))/(x2-x1)
a=log(y1)-b*1
log(y3)=(log(y1)-((log(y2)-log(y1))/(x2-x1))*1)+((log(y2)-log(y1))/(x2-x1))*x3

final part, how can I leave y3 alone?  for example if it was base 10 then I should do this
y3=10^((log(y1)-((log(y2)-log(y1))/(x2-x1))*1)+((log(y2)-log(y1))/(x2-x1))*x3)
but what I should do if there is no base shown...

actually I tested on base 10 and it did give me correct answer I'm just trying to understand what is the default base value of Log so i can place it if there is no log base...

thx
0

Commented:
a=log(y1)-b*x1
base of the log doesn't matter, as long as you are consistent.
0

Author Commented:
I'm sorry that pushing it just have to put in a code and couldn't understand it.
so if we say log(y3)=t+z how do you write y3=...
0

Author Commented:
This might give you idea what I need
Dim b As Double = (Math.Log(y2) - Math.Log(y1)) / (x2 - x1)
Dim a As Double = Math.Log(y1) - b * x1
Dim logY3 As Double = a + b * x3
'Below is the final part of the puzzle :)
Dim y3 as Double = Math.Pow(10, logY3) '<= is this correct?
0

Commented:
it would be correct if Math.Log is base 10
do you have a corresponding Math.Exp?
0

Author Commented:
Math.Exp is available but when I used it calculation changed so I tried Log10 with Power based on 10 and it did work.  After that I tried another points and have a problem.  Any idea?

x1=1
y1=0.31398
x2=51
y2=0.324621
x3=1453
it calculates y3 as 0.82650432082886593 which should be ~3.54-3.55
based on calculation
a = -0.50338750739956328
b = 0.00028949252287212567
0

Author Commented:
I believe the software I'm using has a problem.  OZO, you made my day.  thank you very much for all your help...

Also let me ask you one more question regarding to this one...

I can get slope with =(Y2-Y1) / (X2-X1) and linear value of the point with =( ( Y2 - Y1 ) / (X2 - X1 ))*( X3 - X1 ) + Y1

isn't there any formula to use these values to get semilog value?  the reason I'm asking is the software I'm using shows the slope and value on that semi log line and I assume they may use these values to calculate it... any idea?

thank you very much again
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.