2012HackSessionNotes » History » Version 6

Luis Figueira, 2012-06-20 04:09 PM
fixed style

1 6 Luis Figueira
h1. 2012 Hack Session Notes
2 1 Luis Figueira
3 1 Luis Figueira
4 6 Luis Figueira
h2. Using SMALLbox Add-ons 
5 1 Luis Figueira
6 6 Luis Figueira
These are the steps needed to interface SMALLbox add-ons to the core SMALLbox distribulation:
7 1 Luis Figueira
8 6 Luis Figueira
# Download the add-on distribution from: http://code.soundsoftware.ac.uk/projects/incoherentdl/files
9 1 Luis Figueira
** The version you wish to download is *version 1.1*
10 6 Luis Figueira
** unzip the downloaded file - this will create a folder named @incoherentdl-v1_1@
11 6 Luis Figueira
# Place the add-on code in any convenient location of your file system, and add this to your MATLAB path
12 6 Luis Figueira
** @addpath(genpath('@{incoherentdl-v1_1}'))@
13 6 Luis Figueira
# Modify the relevant files in the folder @{SMALLBox Root}/config/@
14 6 Luis Figueira
** modify or create @{SMALLBox Root}/config/SMALL_learn_config_local.m@
15 6 Luis Figueira
*** @cp {SMALLBox Root}/config/SMALL_learn_local.m SMBOX/config/SMALL_learn_config_local.m@
16 6 Luis Figueira
**** this local file is not tracked by Mercurial 
17 6 Luis Figueira
**** if you need to revert to the _default_ SMALLbox setting, you just need to delete/rename your local file
18 5 Luis Figueira
*** add the following code to the local config file: 
19 2 Luis Figueira
<pre>
20 2 Luis Figueira
elseif strcmpi(DL.toolbox , 'SMALL_incoherentDL')
21 3 Luis Figueira
  DL=SMALL_incoherentDL ( Problem , DL ) ;
22 3 Luis Figueira
   % we need to make sure that columns are normalised to % unit lenght .
23 3 Luis Figueira
  for i = 1: size(DL.D,2)
24 3 Luis Figueira
    DL.D(: ,i)=DL.D(: ,i)/norm(DL.D(: ,i));
25 3 Luis Figueira
  end
26 2 Luis Figueira
  D = DL.D;
27 2 Luis Figueira
</pre>
28 6 Luis Figueira
# Run the @SMALLboxInit.m@ script to set environmental variables
29 6 Luis Figueira
# Run any function or script contained in the add-on.
30 4 Luis Figueira
** example: 
31 6 Luis Figueira
*** @load test_mocod.mat@ 
32 6 Luis Figueira
**** located in @incoherentdl-v1_1/results/test_mocod.mat@ (but already in path)
33 6 Luis Figueira
*** @open SMALL_test_mocod.m@
34 6 Luis Figueira
**** located in @incoherentdl-v1_1/open SMALL_test_mocod.m@
35 1 Luis Figueira
*** run the code from the block that starts on line 110 (with the comment Plot Results)
36 1 Luis Figueira
**** this will display two coherence/signal to noise ratio plots based on results previously computed