get_cell_color.m
来自「多智能体工具包」· M 代码 · 共 27 行
M
27 行
function Cell_Color=get_cell_color(Class_Id)% GET_CELL_COLOR Obtain the Cell Color from class matrix.% Copyright (c) 1997-2000 Jiming Liu and Jianbing Wuglobal CLASS Cell_Color_Pos Class_Matrix_Size;Begin_Row=get_begin_row(CLASS,Class_Id);% calculate the begin row and the begin column of Cell_number.Cell_Red_Row=Begin_Row+Cell_Color_Pos(1,1)-1;Cell_Red_Col=1+Class_Matrix_Size(1,2)+Class_Matrix_Size(2,2)+... Cell_Color_Pos(1,2);Cell_Green_Row=Begin_Row+Cell_Color_Pos(2,1)-1;Cell_Green_Col=1+Class_Matrix_Size(1,2)+Class_Matrix_Size(2,2)+... Cell_Color_Pos(2,2);Cell_Blue_Row=Begin_Row+Cell_Color_Pos(3,1)-1;Cell_Blue_Col=1+Class_Matrix_Size(1,2)+Class_Matrix_Size(2,2)+... Cell_Color_Pos(3,2);Cell_Red=CLASS(Cell_Red_Row,Cell_Red_Col);Cell_Green=CLASS(Cell_Green_Row,Cell_Green_Col);Cell_Blue=CLASS(Cell_Blue_Row,Cell_Blue_Col);Cell_Color=[Cell_Red Cell_Green Cell_Blue]/255;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?