ivan@152: function DL = SMALL_init_DL(toolbox, name, param, profile) ivan@128: %% Function initialise SMALL structure for Dictionary Learning. ivan@128: % Optional input variables: ivan@128: % toolbox - name of Dictionary Learning toolbox you want to use ivan@128: % name - name of the algorithm from above toolbox ivan@128: % param - parameters you want to set ivan@128: idamnjanovic@24: % idamnjanovic@24: % Centre for Digital Music, Queen Mary, University of London. idamnjanovic@24: % This file copyright 2010 Ivan Damnjanovic. idamnjanovic@24: % idamnjanovic@24: % This program is free software; you can redistribute it and/or idamnjanovic@24: % modify it under the terms of the GNU General Public License as idamnjanovic@24: % published by the Free Software Foundation; either version 2 of the idamnjanovic@24: % License, or (at your option) any later version. See the file idamnjanovic@24: % COPYING included with this distribution for more information. idamnjanovic@24: % idamnjanovic@24: %% idamnjanovic@24: ivan@152: if ~ exist( 'toolbox', 'var' ) || isempty(toolbox) ivan@152: DL.toolbox = []; ivan@152: else ivan@152: DL.toolbox = toolbox; ivan@152: end ivan@152: if ~ exist( 'name', 'var' ) || isempty(name) ivan@152: DL.name = []; ivan@152: else ivan@152: DL.name = name; ivan@152: end ivan@152: if ~ exist( 'param', 'var' ) || isempty(param) ivan@152: DL.param = []; ivan@152: else ivan@152: DL.param = param; ivan@152: end ivan@152: if ~ exist( 'profile', 'var' ) || isempty(profile) ivan@152: DL.profile = 1; ivan@152: else ivan@152: DL.profile = profile; ivan@152: end ivan@152: idamnjanovic@24: DL.D=[]; idamnjanovic@24: DL.time=[]; idamnjanovic@24: end