view mt_ensure.m @ 18:062d46712995 tip

Moved mc_global_info1 back to public folder
author samer
date Mon, 02 Apr 2012 21:50:43 +0100
parents be936975f254
children
line wrap: on
line source
% mt_ensure - Ensure that Melody Triange system includes transmats of given size
%
% mt_ensure ::
%    mt_system   ~'melody triangle system',
%    K:natural   ~'desired size of transition matrices'
% -> action mt_system.
%
% If the system already contains transition matrices of size K, then it is
% returned unchanged. Otherwise, a set of transition matrices is sampled using
% the parameters supplied to mt_init. If sampling is done, a scatter plot
% will be generated as a side effect.

function Sys=mt_ensure(Sys,K)
	if length(Sys.transmats)<K || isempty(Sys.transmats{K})
		Sys=mt_resample(Sys,K);
	end
end