How to plot Ixt with monologarithmic scale and find linear fit

In summary, The conversation discusses how to plot experimental data from a simple RC circuit in a logarithmic scale and find a linear fit for the data. The person is unsure how to do this on Origin and is open to using other software such as Mathematica and MATLAB. One person suggests using an exponential form to generate the data points and finding the constants that minimize error, while the other provides links for potential solutions.
  • #1
carlosbgois
68
0
I have some experimental data of a simple RC circuit, which I measured in fixed time intervals the current through an microamperimeter, and now I need to make an [itex]i(t) × t[/itex] graph, with the vertical axis on a logarithmic scale (so my points fall into a 'straight' line), and then I need to find the linear fit for that.

Until now I was using Origin for creating all graphs I needed, but I only know the real basic stuff, and couldn't find my way on solving this particular problem. I also have Mathematica and MATLAB available, so if you do not know how to do that on Origin but know on any other software, it would also be helpful.

Thanks
 
Physics news on Phys.org
  • #2
Hhhmmm...I think you are making matters more confusing by attempting to fit a "straight line" of numbers you have taken the log of...

...if you KNOW that your points follow exponential behavior, you should propose the form of the equation that should generate your points, then, determine the constants in such equation as to minimize the error with your data points (least squares).

does this make sense? or did I totally misunderstood your problem?
 
  • #3
Thanks for your answer. I may not have been very clear, but I did not take the log of my number, I just need to plot the raw data in an logarithmic scale (only on the y axis), and then find the linear fit and plot also using that scale.

Your other alternative is also considerable, because I do have the exponential form for which my points theoretically corresponds. But either this way, I have no idea of how to do it.
 
  • #4
Here are a couple of links, hope they help.

one
two
 
  • #5


To plot Ixt with monologarithmic scale and find linear fit, you can follow these steps:

1. Import your experimental data into a software such as Origin, Mathematica, or MATLAB. Make sure your data is organized in two columns, with time (t) in the first column and current (I) in the second column.

2. In Origin, click on the "Plot" menu and select "2D Graph." In the "Plot Setup" dialog box, select "X" for the X column and "Y" for the Y column. Then, click on the "Y" axis and select "Log" under the "Scale" tab. This will create a logarithmic scale for the Y axis.

3. In Mathematica, use the command "ListLogPlot" to plot your data. This will automatically create a logarithmic scale for the Y axis. For example, the command would be "ListLogPlot[data, Joined->True]" where "data" is the name of your imported data.

4. In MATLAB, use the "semilogy" function to plot your data. This will create a semilogarithmic scale for the Y axis. For example, the command would be "semilogy(t,I)" where "t" is the time column and "I" is the current column.

5. Once you have your graph with a logarithmic Y axis, you can use the "Linear Fit" tool in Origin, the "Fit" function in Mathematica, or the "polyfit" function in MATLAB to find the best linear fit for your data. This will give you the equation of the line and the correlation coefficient (R^2) to determine how well the line fits your data.

6. You can also use the "Plot" function in Mathematica or the "plot" function in MATLAB to plot the linear fit on top of your original graph.

Remember to label your axes and include a legend if necessary to clearly present your data and results.
 

1. How do I plot Ixt with monologarithmic scale?

To plot Ixt with monologarithmic scale, first, determine the range of values for both the I and t variables. Then, take the logarithm of the I values and plot them on the y-axis, and plot the t values on the x-axis. This will create a monologarithmic scale plot.

2. What is a monologarithmic scale plot?

A monologarithmic scale plot is a type of graph where the values on one axis are plotted on a logarithmic scale, while the other axis is plotted on a linear scale. This type of plot is useful for visualizing data with a wide range of values.

3. How do I find a linear fit on a monologarithmic scale plot?

To find a linear fit on a monologarithmic scale plot, you can use a logarithmic transformation to convert the data into a linear form. Then, you can use a linear regression method to find the best-fit line for the data.

4. What is a linear fit?

A linear fit is a method used to find the best-fit line for a set of data points. It involves finding the slope and y-intercept of a line that closely follows the trend of the data. This line can then be used to make predictions or analyze the relationship between the variables.

5. Why is it important to use a monologarithmic scale for plotting Ixt data?

When plotting Ixt data, the values for the variable I can range from very small to very large. Using a monologarithmic scale allows us to better visualize this wide range of values and see any patterns or trends in the data. It also makes it easier to find a linear fit for the data, as a logarithmic transformation can help to make the data more linear.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • General Math
Replies
2
Views
8K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top