colplot.m

来自「用matlab实现利用统计混沌方法解决非线性系统时间序列预测的问题」· M 代码 · 共 32 行

M
32
字号
function colplot(x,s,v);
% The function:
% 
%       colplot(x,s,v);
% 
% plots the columns of <x> according 
% to the optional line shape given by <s> 
% (see PLOT, here default is <s>='.').
% The optional arg <v> is a row vector giving the indices 
% of the columns to be plotted; if length(v)>=3 and 
% size(x,2)>=3, only the first 3 entries of <v> are used. 

if ~exist('s'),
        s = '.';
elseif isempty(s),
        s = '.';
end;

if nargin<3,
        v = 1:min(3,size(x,2));
elseif length(v)>min(3,size(x,2)),
        v = v(1,min(3,size(x,2)));
end;
v = min(v,size(x,2));

if length(v)==1,
        plot(x(:,v(1)),x(:,v(1)),s);
elseif length(v)==2,
        plot(x(:,v(1)),x(:,v(2)),s);
elseif length(v)==3,
        plot3(x(:,v(1)),x(:,v(2)),x(:,v(3)),s);
end;

⌨️ 快捷键说明

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