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

basicfittinginterfaceMATLABsubplotsubplots

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.

Best Answer

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.