⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bnrun.m

📁 Speaker Verification Toolbox
💻 M
字号:
function y = bnRun(x,F,varF,nv,nsteps)

% y = bnRun(x,F,varF,nv,nsteps) - run a Boolean Network
% This function runs a BN starting from the initial starting state x (a
% binary row vector) for nsteps steps. It essentially uses bnNextState in
% an iterative fashion. The output is a matrix Y (nsteps+1-by-length(x))
% containing the history of the process. If x is not a vector, but the word
% 'rand', then a random starting state is used

% Functions used: bnNextState.m

% Ilya Shmulevich; Aug. 14, 2001
% Modified May 12, 2003 by HL.

n = size(varF,2); % number of genes

if isstr(x) % if we want a random start
    x = rand(1,n)>0.5;
end

y = zeros(nsteps+1,n); % initialize Y
y(1,:) = x; % first one is initial state
for step = 2:nsteps+1,
   x = bnNextState(x,F,varF,nv);
   y(step,:) = x; % update history
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -