Logarithmic Plotting for Function of Temperature

In summary, Mindscrape suggests taking the log of the data points instead of dotting them to the power of 3/2. This will result in a straight line and a "log plot."
  • #1
WolfOfTheSteps
138
0

Homework Statement



I have a function of temperature, and I am asked to do the following:

"Plot it in logarithmic scale as a function of the logarithm of temperature"

The Attempt at a Solution



Does this mean I just make the horizontal axis, T, a logarithmic numberline?

Or do I have to actually plot my function f(T) as f(ln(T)), and just have relatively small numbers on the x-axis numberline?

While the second option seems to literally be what the question is asking me to do, I don't see the point! You loose the ability to see T on the x-axis! (Instead you see numbers for ln(T) which is not intuitive) Both plots look basically the same, so why would the question ask me to do the latter option??

Thanks!
 
Physics news on Phys.org
  • #2
It may not be intuitive because you aren't so used to it. There are some things, like spectral power, that I couldn't even imagine not being on a log scale and would almost be non-intuitive for it not to be.

If your temperature varies exponentially, then the log scale can tidy up the data, and show relationships that are not otherwise obvious.

Hard to say without seeing your data though. Could you somehow post it?
 
  • #3
Yeah, it's just three functions of temperature for the effective conduction band density of states for Si, Ge, and GaAs. After doing all the computations, here are the 3 functions:

[tex] N_{c,Si} = 5.447\times 10^{20} \cdot T^{3/2}[/tex]
[tex] N_{c,Ge} = 2.03\times 10^{21} \cdot T^{3/2}[/tex]

and

[tex] N_{c,GaAs} = 8.38\times 10^{19} \cdot T^{3/2}[/tex]

So I just set up an array in Matlab for T values from 1 to 1000 Kelvin, then took the natural log of the array and plotted each of these functions as a function of these logarithms rather than of T. (I just substituted T for ln(T) in each of the above equations)

If you are familiar with matlab, my code was:

Code:
T1 = 0.1:.1:1000
T = log(T1)
NcSi = 5.447e20*T.^(3/2)
NcGe = 2.0343e21*T.^(3/2)
NcGaAs = 8.375e19*T.^(3/2)
plot(T,NcSi,T,NcGe,T,NcGaAs)

Then I adjusted the y-axis in the figure editor to make it logarithmic as well. Do you think I'm doing it correctly?

Here's a picture:

http://img223.imageshack.us/img223/8372/curveshp4.th.jpg
 
Last edited by a moderator:
  • #4
Ah, okay, so your original data is some kind of exponential function. If you take the ln or log of the y-axis then it should work out.

Say you have a function
y(x) = e^(Tx) + B

if you take natural log

ln(y(x))=Y(x)= Tx + lnB

now the function Y(x) is linear, and you can figure out the time constant, decay constant, whatever from the slope of the new linear function.

Sorry this is brief, I could explain the slope part, but my laptop battery is about to die and if you can figure it out :).

Edit:
Also, just now looking at your code I see that it is not an exponential function, so this doesn't work. I'll look at the problem a little later.
 
Last edited:
  • #5
So, in general the purpose is going to be to take some function that varies by some sort of power and make it a straight line. If you take the log of both the function and the dependent variable then you will get a straight line.

In your code you are dotting the log of the temperature vector to the power of (3/2), where as you want to be taking the normal data, without the log, and getting your data points. Then take those normal data points and take the log of them. If you then plot the log of those points with the log of the temperature vector, you should get a straight line and a "log plot."

Do something like
Code:
%find data points
T1 = 0.1:.1:1000;
NcSi = 5.447e20*T1.^(3/2);
NcGe = 2.0343e21*T1.^(3/2);
NcGaAs = 8.375e19*T1.^(3/2);
%log stuff
T = log(T1);
LNcSi = log(NcSi);
LNcGe = log(NcGe);
LNcGaAs = log(NcGaAs);
%plot stuff
plot(T,LNcSi,T,LNcGe,T,LNcGaAs)
title('Semiconctors')
xlabel('Log Temperature')
ylabel('Log Rating(?)')
 
  • #6
Thanks, Mindscrape. I really appreciate the time you've taken to help me out!
 

FAQ: Logarithmic Plotting for Function of Temperature

1. What is a logarithmic plot?

A logarithmic plot is a type of graph where one or both axes use a logarithmic scale instead of a linear scale. This means that the increments on the axes increase by a constant ratio rather than a constant value.

2. Why is a logarithmic plot useful?

A logarithmic plot is useful for visualizing data that spans a large range of values. It compresses the data, making it easier to see patterns and trends in the data. It also allows for a better comparison of values that differ by orders of magnitude.

3. How do you create a logarithmic plot?

To create a logarithmic plot, you will need to use software or tools that allow you to plot data on a logarithmic scale. This can be done in programs like Excel or by using specialized graphing software. In most cases, you can simply select the option for a logarithmic scale on the axes.

4. What is the difference between a logarithmic plot and a linear plot?

The main difference between a logarithmic plot and a linear plot is the scale of the axes. In a linear plot, the increments on the axes increase by a constant value, while in a logarithmic plot, the increments increase by a constant ratio. This makes the shape of the graph appear differently and allows for a better visualization of data that spans a large range of values.

5. When should I use a logarithmic plot?

A logarithmic plot should be used when your data has a wide range of values and you want to see patterns and trends more clearly. It is also useful when you want to compare values that differ by orders of magnitude. However, it should be noted that a logarithmic plot can make data appear distorted, so it is important to consider the nature of your data before deciding to use a logarithmic scale.

Back
Top