I have include some example data.
[xData, yData] = prepareCurveData(log10(plot_data.xdata), plot_data.ydata);
[fitresult, gof] = fit( xData, yData, ft );
I have distance on the x-axis, and sound pressure level on the y-axis. The distances are originally in metres, but when I fit a best fit line, the equation I use needs them to be logged. My issue is that I want to convert the x-axis back to metres so it's in a readable format. In addition, I'd like this to be on a logarithmic scale.
I tried the following:
but the x-axis doesn't appear to be logged at all when I do this and the 1000m value disappears when I set the scale to log.