Documentation of figure_gui


Index of all files: short | long | this subdirectory only: short | long


Function Synopsis

varargout = figure_gui(varargin)

Help text

 FIGURE_GUI M-file for figure_gui.fig
      FIGURE_GUI, by itself, creates a new FIGURE_GUI or raises the existing
      singleton*.

      H = FIGURE_GUI returns the handle to a new FIGURE_GUI or the handle to
      the existing singleton*.

      FIGURE_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
      function named CALLBACK in FIGURE_GUI.M with the given input arguments.

      FIGURE_GUI('Property','Value',...) creates a new FIGURE_GUI or raises the
      existing singleton*.  Starting from the left, property value pairs are
      applied to the GUI before figure_gui_OpeningFcn gets called.  An
      unrecognized property name or invalid value makes property application
      stop.  All inputs are passed to figure_gui_OpeningFcn via varargin.

      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
      instance to run (singleton)".

 See also: GUIDE, GUIDATA, GUIHANDLES

Cross-Reference Information

This function calls

Listing of function figure_gui

function varargout = figure_gui(varargin)

% Edit the above text to modify the response to help figure_gui

% Last Modified by GUIDE v2.5 06-Oct-2010 16:49:31

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @figure_gui_OpeningFcn, ...
                   'gui_OutputFcn',  @figure_gui_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before figure_gui is made visible.
function figure_gui_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to figure_gui (see VARARGIN)

% Choose default command line output for figure_gui
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes figure_gui wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = figure_gui_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
disp('Displaying Figure 1');

load ddp_paper_data; % load the the beat annotations and beat outputs
x =wavread('fig1_audio.wav');
circhistogram_plot(anns{46},beats{2,46},x,1);


% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
disp('Displaying Figures 2 and Extra');

load ddp_paper_data; % load the the beat annotations and beat outputs
% generate the results for each file
% generate the results for each file
params = be_params;
for j=1:size(beats,1),
  for i=1:length(anns),
    score{j}(1,i)=be_pScore(anns{i},beats{j,i},params);
    score{j}(3,i)=be_cemgilAcc(anns{i},beats{j,i},params);
    [score{j}(2,i),tmp1,tmp2,score{j}(4,i)]=be_continuityBased(anns{i},beats{j,i},params);
    score{j}(5,i)=be_informationGain(anns{i},beats{j,i},params);
  end
end

evallabel{1}='PScore (%)';
evallabel{3}='Cemgil (%)';
evallabel{2}='CMLc (%)';
evallabel{4}='AMLt (%)';

figlabel{1}='(a)';
figlabel{2}='(b)';
figlabel{3}='(c)';
figlabel{4}='(d)';

for j=1:size(beats,1)
figure(4-j); % NOR CHANGE: show beat tracker performance in figure 2 and human annotations in figure 3
  for i=1:length(evallabel), % the number of evaluation methods being compared to information gain
    subplot(2,2,i); hold on;
    scatter(score{j}(i,:),score{j}(5,:),'k*'); xlim([0 100]); ylim([0 log2(params.informationGain.numBins)]);
    xlabel(evallabel{i});
    ylabel('Information Gain (bits)');
		title(figlabel{i});
  end
end

handles.score = score;
guidata(hObject, handles);


% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
disp('Saving Data');

data = load('ddp_paper_data'); % load and store in data

try 
	data.score = handles.score;
	data.scorelabels{1} = 'PScore';
	data.scorelabels{2} = 'CMLc';
	data.scorelabels{3} = 'Cemgil';
	data.scorelabels{4} = 'AMLt';
	data.scorelabels{5} = 'Information Gain';
catch
	disp('No results to save just saving input data');
end

assignin('base','data',data);

% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

disp('Displaying All Figures');
pushbutton1_Callback(hObject, eventdata, handles);
pushbutton2_Callback(hObject, eventdata, handles);


% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton6 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

disp('Closing Figures');
close all;

% to print figures use this command
%fig2eps(6,8,200,'fig1.eps',gcf,0.3,'Times',12,1,1,1);
%fig2eps(6,8,200,'fig2.eps',gcf,0.3,'Times',12,1,1,1);
%fig2eps(6,8,200,'fig_extra.eps',gcf,0.5,'Times',12,1,1,1);

Produced by mtree2html by Hartmut Pohlheim