Semilog plot in curve fitting tool
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Robert Demyanovich
el 13 de Nov. de 2021
Respondida: Pavan Guntha
el 16 de Nov. de 2021
I am new to using the curve fitting tool. I have some data that I want to fit a curve to. I have clicked on the curve fitting icon in Matlab and the form titled "Curve Fitting Tool" pops up. I've selected the vector containing the x data and the vector containing the y data. I then entered my custom equation and results are put into the "Results" box. Adjacent to the "Results" box is the graph. What I would like to be able to do is to have the graph show as a semilog plot (x values on log scale, y values on linear scale). I can't figure out how to do that.
Note that I am not ready to implement this into my MatLab code. I want to play around with equations first.
0 comentarios
Respuesta aceptada
Pavan Guntha
el 16 de Nov. de 2021
Hello Robert,
There isn't any direct option to plot the data in a semilog plot using Curve Fitting Toolbox. The workaround is as follows:
From the curve fitting tool, once you're done with the fitting, click on File -> Generate Code to generate the MATLAB code for your fit. Then you could vary the axes properties such that 'x' values get plotted on a log scale. The following example illustrates this process:
Consider the 'x' and 'y' data as:
xData = linspace(1,10000,20);
yData = [1:20];
You can click on Generate Code as shown below:
In the generated, after the plot command, you could place the following command to change the x-axis to log scale:
Hope this helps!
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Linear and Nonlinear Regression en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!