How can I change Axis properties in cftool?
34 views (last 30 days)
Show older comments
I am working with the cftool and I would like to do a custom fit.
When the fited Graph and my data is displayed in the axis it is a linear axis. I need the xaxis to be logarithmic though. I read one feed in which it was suggested to generate the code and then changing plot into semilogx. I have tried doing this, but then I get an error message in the command window and nothing happens.
Ideally I would like to just change the properties of the GUI CFTool so that it is logarithmic there. Is this possible? I know with other axis I can usually just open the Inspector and change settings but here I have no option to get to the Inspector.
Please help, I am going crazy over this
1 Comment
dpb
on 9 Aug 2014
Looks like you're out of luck w/ the cftool stuff--at least in the release here doesn't appear there's any choice at all regarding linear/logarithmic axes for the internal plot. Bestest can tell you would be to use the "export to the figure" or whatever the option is actually called where you would then have a real set of axes to mung upon. The tool is moderately limited in its facilities it appears; wouldn't be my choice of much of any way to use Matlab--but, then again, I've got nearly 30 yr of using it at the command line so that's the way I'm comfortable.
Answers (2)
Ahmet Cecen
on 9 Aug 2014
I was able to do this easily using file->print to figure, then changing the scale as in any other figure. Also, make sure you don't have any non positive elements on the axis you want to display as logarithmic.
2 Comments
Thi Na Le
on 3 May 2021
plot using log scale was not the problem. my problem is fitting in the log scale because my data all in log scale. DO you have any suggestion? thank you very much
dpb
on 3 May 2021
Take the logs of the data before importing to the tool -- of course, this is fraught with the problem your plots will then be in log space, not the units of the variables...
As noted, don't try to use the prepackaged tool; use the regular fit function with custom model.
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!