编程技术、软件应用与系统模拟

(Programming, Applicaiton and Simulation)



本站目录

 

首页
ASP/Access/IIS
DELPHI/PASCAL
PASCAL高级编程
C语言编程实例
WORD
Excel
MATLAB
MINITAB讲座
Windows
DOS
SAS
生物系统模拟
土壤水分剖析器
其他



镜像站点

 

主站
北美镜象站
欧洲镜象站(1)
欧洲镜象站(2)

本站 Google

[搜索]  [站内导航]
座右铭:
只做有益人类的事
不做有害人类的事


Build a boolean network in MATLAB

Zhanshan Dong

Before I tried to build a boolean network, I think it is quite complicated. But it comes that building a boolean network is pretty simple. I even did it in MATLAB. IT does not need ode function to solve the problem. Just put the rate of change logic equations in a ordinary equation, to calculate several steps (step size always 1). You can get the answer. The sample code is listed in the following.
function test;
a = 1;
b = 1;
c = 1;
for i = 1:10
    [a, b, c] = calabc(a, b, c);
    [a b c]
end

function [a,b,c] = calabc(a0, b0, c0)
a = b0;
b = a0 | c0;
c = (a0 & b0) | (b0 & c0) | (a0 & c0);

© 1998-, 董占山, 版权所有。
转载文章请注明出处(www.sunfinedata.com/articles)。