samer@0: % mt_init - Initialise Melody Triangle system. samer@0: % samer@0: % mt_init :: samer@0: % A0:nonneg ~'parameter for sampling', samer@0: % B0:nonneg ~'parameter for sampling', samer@0: % A1:nonneg ~'parameter for sampling', samer@0: % B0:nonneg ~'parameter for sampling', samer@0: % L:natural ~'number of transmats to sample' samer@0: % -> mt_system. samer@0: % samer@0: % Initial system contains no transition matrices - you samer@0: % must call mt_ensure with a particular value of K samer@0: % to sample a set of L transition matrices of that size. samer@0: % samer@0: % Initial calibration is equivalent to: samer@0: % sys=mt_calibrate(sys, 1:3, [0,1,0;0,0,1]); samer@0: % samer@0: % The figure for scatter plots is fixed to figure 50 for now. samer@0: samer@0: function Sys=mt_init(A0,B0,A1,B1,L) samer@0: Sys.sample_transmats = @(k)sample_transmat_hdp(A0,B0,A1,B1,k,L); samer@0: Sys.transmats = {}; samer@0: Sys.info = {}; samer@0: Sys.refpoints = [0,0;1,0;0,1]'; samer@0: Sys.fig = 50; samer@0: Sys = mt_calibrate(Sys); samer@0: end