楼主: pwsir
3293 3

RS 分形程序 [推广有奖]

  • 0关注
  • 2粉丝

硕士生

11%

还不是VIP/贵宾

-

威望
0
论坛币
86 个
通用积分
0
学术水平
0 点
热心指数
1 点
信用等级
0 点
经验
2194 点
帖子
112
精华
0
在线时间
127 小时
注册时间
2006-9-23
最后登录
2022-10-28

楼主
pwsir 发表于 2007-12-6 17:14:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

请教高手 我这个程序运行出现点问题 ,哪位高手帮忙解决一下?谢谢

function[vmrs,VERS,H,C,R]=RS2(vector)
%this program makes use of the classical R/S method.
N=length(vector);
n=5;
vmrs=[];
%the vector vmrs is used to save the log of the mean value of R/S.
h=[];
%this vector is used to save the log value of length n.
VRS=[];
%it represents V-statistic
while n<N
a=floor(N/n);
s=0;
for i=1:a;
v1=zeros(n,1);
vl=vector(n*(i-1)+1:n*(i-1)+n);
m=mean(v1);
%find the mean value of the I-th sub-vector.
v2=v1-m;
v3=cumsum(v2);
%the cumulative deviations from mean of the I-th sub-vector.
r=max(v3)-min(v3)
%range calculation.;
sig=std(v1,1);
%sample standard deviations normalized by n.
rs=r/sig;
s=s+rs;
%the sum of rescaled range for‘a’sub-vectors correspond to the
%length n of subvector.
end
mrs=s/a;
vmrs=[vmrs;log10(mrs)];
h=[h;log10(n)];
VRS=[VRS;mrs/sqrt(n)];
n=n+1;
end
figure(1);
[H,C,R]=postreg(vmrs','h');
%to make use of BP network to make regression about‘vmrs’versus‘h’
figure(2)'
plot(h,vmrs,'*')
hold on;
y=C+H*h;
plot(h.y,'r-');
hold on;
polt(h,VRS,'r');
disp(VRS');
figure(3);
plot(h,vmrs,'*')
Cn=2^(2*H-1)-1;
disp('the correlation funtion Cm=');
disp(Cn);

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:represents statistic represent Classical presents 程序 分形

沙发
pwsir 发表于 2007-12-9 10:10:00
怎么没有人回答啊?唉

藤椅
zhb0416 发表于 2008-1-6 23:07:00

哈哈哈,这个程序,我见过啊.你把第一行function[vmrs,VERS,H,C,R]=RS2(vector)
%this program makes use of the classical R/S method.

新建一个m文件,其他的在另一个m文件就可以了.如果提示没有定义,你就把那个行删掉.就ok了.我运行过的.我也在做分形.zhaohongbao0416@sina.com

板凳
jasmine850131 发表于 2013-8-28 11:44:09
function[vmrs,VRS,H,C,R]=RS2(vector),把函数改为这个就没有问题了

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-1 14:50