help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a function similar to matlab gcf?


From: David Bateman
Subject: Re: Is there a function similar to matlab gcf?
Date: Tue, 03 Oct 2006 21:33:29 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

frank wang wrote:
> Sorry for the confusion. gcf is the function from matlab:
>  
> GCF Get handle to current figure.
>     H = GCF returns the handle of the current figure. The current
>     figure is the window into which graphics commands like PLOT,
>     TITLE, SURF, etc. will draw.
>  
>     The handle of the current figure is stored in the root
>     property CurrentFigure, and can be queried directly using GET,
>     and modified using FIGURE or SET.
>  
>     Clicking on uimenus and uicontrols contained within a figure,
>     or clicking on the drawing area of a figure cause that
>     figure to become current.
>  
>     The current figure is not necessarily the frontmost figure on
>     the screen.
>  
>     GCF should not be relied upon during callbacks to obtain the
>     handle of the figure whose callback is executing - use GCBO
>     for that purpose.
>  
>     See also figure, close, clf, gca, gcbo, gco, gcbf.
>  
> Basically, in our code, we need to get the current figure number. I just
> realized that since it is related with graphics command, most likely
> octave will not have this command.
>  

Hey FRank,

We're a community, propose a patch for setdiff would be the fastest way
for setdiff to support this feature..

As for gcf, this is a handle graphics feature, and there has been long
discussions about adding all of these compatibility features, and its
timetabled for octave 3.1 next year.

If you just want the current figure number then in 2.9.9, then one nasty
unsupported way of doing it is a function

function h = get_current_figure()
global __CUrrent_figure__;
h = __current_figure__;
end

Don't think this works in 2.1.73 though...

D.

> Thanks
>  
> Frank
>  
> On 10/3/06, *David Grohmann* <address@hidden
> <mailto:address@hidden>> wrote:
> 
>     frank wang wrote:
>>     Hi,
>>      
>>     I am poriting existing code to octave. One function gcf is missing
>>     from octave. Is there a function or a way to do the similar thing
>>     as gcf in matlab?
>>      
>>     Also, matlab updates its setdiff function. The new setdiff
>>     function can return a second result which contains the index.
>>     Hopefully, octave will also update its setdiff function.
>>      
>>     Thanks
>>      
>>     Frank
>>     ------------------------------------------------------------------------
>>
>>     _______________________________________________
>>     Help-octave mailing list
>>     address@hidden <mailto:address@hidden>
>>     https://www.cae.wisc.edu/mailman/listinfo/help-octave
>>       
>     is gcf greatest common factor? if so just google for euclid gcd the
>     algorithm is pretty simple. gcd(a,b) = { if a = 0, return b, else
>     return gcd( b%a, a) }
> 
>     gcd  = greatest common divisor, same thing.
> 
>     -- 
>     David Grohmann
>     Senior Student Associate
>     Applied Research Lab : UT Austin : ESL - S206
>     Office: 512-835-3237
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave



reply via email to

[Prev in Thread] Current Thread [Next in Thread]