Basic fitting in GUI axes

I have a GUI containing some axes for plotting data. I would like to use the Basic Fitting routine under the Tools tab of the figure menu on the GUI. However it is greyed out. The only method I can find is to copy the relevant axes from my GUI to a new, separate figure and do the fitting on that. This however is very unsatisfactory. Is there a method of fitting the data directly into the GUI axes?
Gordon

7 件のコメント

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 9 月 30 日
what do you mean by 'fitting the data directly into the GUI axes'
Gordon
Gordon 2012 年 10 月 1 日
Can I use the Basic Fitting routine on data plotted in axes that are part (children) of a GUI?
Image Analyst
Image Analyst 2012 年 10 月 1 日
Are you using an m-file to to this? Or trying to do it interactively? If using an m-file, are you using GUIDE, or creating all the controls yourself with uicontrol()?
Gordon
Gordon 2012 年 10 月 1 日
The question is irrelevant. Basic Fitting is a Matlab tool under the Tools tab of the standard figure menu. If you create a figure you will see it. The figure menu is also available if one creates a GUI. Then however the Basic Fitting tool is disabled and I would like to know how to get around this so that I can use the Basic Fitting tool on any axes within my GUI.
Image Analyst
Image Analyst 2012 年 10 月 1 日
So the answer is you're doing it interactively, manually via toolbars and dialog boxes, instead of programmatically in your m-file code via calls to polyfit() and polyval() or some fancy function in the Curve Fitting Toolbox.
I plotted stuff (one axes, and two axes per figure) and it was enabled. Are you sure you have data in the axes? Assuming yes, then maybe you should just call the Tech Support because I can't reproduce. If you can give us some short code to reproduce the menu function being disabled, then we can try it. Something like:
subplot(2,1,1);
plot(1:10)
subplot(2,1,2);
plot(30:35);
Right now, I'm at a loss because I don't see the problem you're seeing. I use R2012b.
Azzi Abdelmalek
Azzi Abdelmalek 2012 年 10 月 1 日
編集済み: Azzi Abdelmalek 2012 年 10 月 1 日
Even you have data in the axes, the basic fitting is still disabled
Gordon
Gordon 2012 年 10 月 1 日
You are creating a figure using the command 'subplot'. I have no problem with that. What you must do is create a GUI, gui.fig, with some axes on it and ensure that the GUI has the figure menubar on it. Run the GUI with some data for plotting in e.g. the startup function of gui.m and now try the Tool tab of the menu bar. The Basic Fitting submenu will be disabled & that is the problem.

サインインしてコメントする。

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 10 月 1 日

0 投票

Try setting the figure property 'Toolbar' to 'figure'.

1 件のコメント

Gordon
Gordon 2012 年 10 月 1 日
Doesn't make any difference - the Basic Fitting submenu is still disabled

サインインしてコメントする。

Robert Moore
Robert Moore 2020 年 1 月 9 日

0 投票

I am having a similar problem right now. There is a chance that you are dealing with a very large dataset and there is not enough memory to complete this action.

1 件のコメント

Gordon Edwards
Gordon Edwards 2020 年 1 月 11 日
Hi Robert
Um - I don't understand why you are replying to a question originally posed in 2012.
.Gordon

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGraphics Performance についてさらに検索

質問済み:

2012 年 9 月 30 日

コメント済み:

2020 年 1 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by