When using the Basic Fitting Interface on a figure with subplots in MATLAB, how can I specify which subplot I want to fit to?

4 views (last 30 days)
I have created a figure with subplots using:
x = 1:10;
subplot(2,1,1), plot(x, x.^2)
subplot(2,1,2), plot(x, x.^3)
Then, I open the Basic Fitting Interface from the "Tools" menu.
I would like to be able to specify which subplot contains the data I want to fit.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This enhancement has been incorporated in Release 2006a (R2006a). For previous product releases, read below for any possible workarounds:
You can specify which data set you are fitting by using the "Select data:" dropdown menu at the top of the Basic Fitting Interface.
In the example given, each subplot will have a legend indicating which subplot corresponds to which data set. You can then use this to select the appropriate data set from the "Select data:" dropdown menu. The resulting fit will be plotted in the same subplot as the data set.

More Answers (0)

Products


Release

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!