⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 torsade.m

📁 用matlab实现利用统计混沌方法解决非线性系统时间序列预测的问题
💻 M
字号:
function out = torsade(nbr,angle,loops,width)
% The function:
%
%       out = torsade(nbr,angle,loops,width)
%
% generates a 3-dimensional database with <nbr> elements.
% These elements draw a circular twisted ribbon (with
% diameter = 2.0);
% The optional parameter <angle> gives the number of 
% revolution; for example, 0.5 gives an half circle 
% ribbon; default value is 1.0. 
% The optional parameter <loops> gives the number of 
% ribbon "twists" for <angle> revolutions;
% default value is 0.5. 
% The optional parameter <width> gives the width of the 
% ribbon; default value is 0.5.  
% The call by default:
% 
%       torsade(nbr)
% 
% generates a moebius ribbon. 

if nargin<2, angle = 1.0; end;
if nargin<3, loops = 0.5; end;
if nargin<4, width = 0.5; end;

a1 = 2*pi*angle*rand([nbr,1]);
a2 = loops/angle*a1;
w1 = width*(0.5-rand([nbr,1]));

out = zeros([nbr,3]);

out(:,1) = (1+w1.*cos(a2)) .* cos(a1);
out(:,2) = (1+w1.*cos(a2)) .* sin(a1);
out(:,3) = w1.*sin(a2);

⌨️ 快捷键说明

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