help-octave
[Top][All Lists]
Advanced

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

Re: Matlab menu-driven code - problem


From: Lester Anderson
Subject: Re: Matlab menu-driven code - problem
Date: Mon, 26 Aug 2013 15:02:33 +0100

Hi Ben

I have run the command as suggested but still get a blank figure window, not as you show. Am I missing something in the installation - no error when I ran the following - straight start of Octave and move to the script folder:

GNU Octave, version 3.6.4
Copyright (C) 2013 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "i686-pc-mingw32".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.

warning: gmsh does not seem to be present some functionalities will be disabled
warning: dx does not seem to be present some functionalities will be disabled
warning: function C:\Octave\Octave3.6.4_gcc4.6.2\share\octave\packages\statistics-1.2.0\fstat.m shadows a core library f
unction
octave:1> cd c:\matlab\flex2d
octave:2> close all
octave:3> graphics_toolkit fltk
octave:4> flex2d  <------  still gives a blank window (no menus)
octave:5>

Cheers
Lester


On 26 August 2013 13:14, Michael Goffioul <address@hidden> wrote:
On Mon, Aug 26, 2013 at 8:08 AM, Nicholas Jankowski <address@hidden> wrote:
On Mon, Aug 26, 2013 at 7:12 AM, Lester Anderson <address@hidden> wrote:
Hello all,

I have some Matlab code that computes a number of geophysical/flexural parameters and should plot the data out. However, the front-end code to the functions does not do anything other than generate a blank figure window: The code below is the top level program that calls the function from the HM_ variables

%program flex2d

%defining variables

global flagelas
global flagtyp
global flaggeom
global flaghede
global flagsol
global flagfig


flagelas=0;
flagtyp=0;
flaggeom=0;
flaghede=0;
flagsol=0;
flagfig=0;

%setting the graphical user interface

canvas = figure('Name','FLEX2D');  <------ this works and the figure window opens, then that is it !

%------------------------------------------------------------------------

HM_par = uimenu(gcf,'Label','Parameters');
HM_parmec = uimenu(HM_par,'Label','Elastic properties', 'Callback', 'elas');
HM_parana = uimenu(HM_par,'Label','Type of analysis','Callback','tanal');

HM_geom = uimenu(gcf,'Label','Geometry');
HM_geomlo = uimenu(HM_geom,'Label','Load geometry','Callback','geom');
HM_geomde = uimenu(HM_geom,'Label','Heights and Densities of loads','Callback','hdens');
HM_geomfi = uimenu(HM_geom,'Label','Read loads from file','Callback','refile');

HM_sol = uimenu(gcf,'Label','Analytical Solution');
HM_solbe = uimenu(HM_sol,'Label','Solve','Callback','solbeams');
HM_solres = uimenu(HM_sol,'Label','Model Results','Callback','results');

HM_plot = uimenu(gcf,'Label','Plot');
HM_plotin = uimenu(HM_plot,'Label','Undeformed Topography','Callback','undef');
HM_plotout = uimenu(HM_plot,'Label','Deformed Topography','Callback','defor');


HM_help = uimenu(gcf,'Label','Help');
HM_helpab = uimenu(HM_help,'Label','About Flex2d','Callback','boxabout');
HM_helpbox = uimenu(HM_help,'Label','Help','Callback','boxhelp');

%-----------------------------------------------------------------------------

All the highlighted function in bold exist in the run folder so that is not the problem (yet)

All of the HM_xxx have attributed values, so I assume it is actually doing something. But the calls to the functions in the uimenu are not run/active. Is there anything wrong or is there a different methodolgy to follow for Octave?

Cheers
Lester


maybe a silly thing, but in the octave help, the keywords 'label' and 'callback' are lowercase. can anyone comment on whether such thing case sensitive in octave?

Property names (in the graphics system) are not case-sensitive.

Michael.



reply via email to

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