plot_location_part.m
来自「一个matlab的将军模型」· M 代码 · 共 32 行
M
32 行
function plot_location_part(idx)
% Plot the partition of the `invariant` faces for the specified `location`
% for PIHA with 2-D/3-D continuous dynamics.
%
% Syntax:
% "plot_location_part(idx)"
%
% Description:
% Plot the "linearcon" object representing the polytopes in the partition
% of the faces of the `invariant` for the `location` specified by the
% index "idx".
%
% Note:
% This routine only works for PIHA that have 2-D/3-D continuous
% dynamics. For 2-D systems, the boundary between two polytopes will not
% be visible if the polytopes being plot are lines.
%
% See Also:
% piha
global GLOBAL_AUTOMATON
clf; grid on; view(3)
for k = 1:length(GLOBAL_AUTOMATON{idx}.face)
face_k = GLOBAL_AUTOMATON{idx}.face{k};
for l = 1:length(face_k.state)
patch = face_k.state{l}.polytope;
plot(patch,[1 1 0])
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?