spirale.m
来自「用matlab实现利用统计混沌方法解决非线性系统时间序列预测的问题」· M 代码 · 共 21 行
M
21 行
function out = spirale(nbr,revo,step)
% The function
%
% out = spirale(nbr,revo,step);
%
% generates a 2-dimensional database with <nbr> elements.
% These elements draw a spiral.
% The optional parameter <revo> gives the number of
% revolution of the spiral; default value is 2.0.
% The optional parameter <step> sets the distance between
% two "consecutive spires"; default value is 1.0.
if nargin<2, revo = 2; end;
if nargin<3, step = 1; end;
r = rand([nbr,1]);
out = zeros([nbr,2]);
out(:,1) = step*revo*r.*cos(2*pi*revo*r);
out(:,2) = step*revo*r.*sin(2*pi*revo*r);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?