colorcells.m
来自「一个matlab的将军模型」· M 代码 · 共 25 行
M
25 行
blue = 1;
red = 4;
for current_state=1:8
for i=1:length(List_cells)
pthval = GLOBAL_PIHA.Cells{List_cells(i)}.pthflags;
val_pred = ... % values related to hyperplanes h0001,h0002 and h0003
(pthval(1)&(current_state == 1))|...
(pthval(2)&(current_state == 2))|...
(pthval(3)&(current_state == 3))|...
(pthval(4)&(current_state == 4))|...
(pthval(5)&(current_state == 5))|...
(pthval(6)&(current_state == 6))|...
(pthval(7)&(current_state == 7))|...
(pthval(8)&(current_state == 8));
array(current_state).cell(i) = List_cells(i);
if val_pred
array(current_state).color(i) = red;
else
array(current_state).color(i) = blue;
end
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?