声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1138|回复: 0

[共享资源] 分数维Brownian运动之Matlab程序

[复制链接]
发表于 2006-10-11 09:47 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
  1. function fBr = MakeBrownian(n,H,par)
  2. % MakeBrownian -- Create Fractional Brownian Signal
  3. % Usage
  4. % fBr = MakeBrownian(n,H,par)
  5. % Inputs
  6. % n signal length
  7. % H base of digits in expansion
  8. % par optional, degree of extension in algorithm, default =8.
  9. % Outputs
  10. % fBr (pseudo) Fractional Brownian signal
  11. %
  12. % Description
  13. % Uses a Frequency Domain algorithm to get a pseudo Brownian Motion
  14. % The law is NOT normalized to give unit variance to unit increments.
  15. %
  16. if nargin < 3,
  17. par = 8;
  18. end
  19. N = n .*par;
  20. % generate the FT of a real white noise
  21. w = WhiteNoise(zeros(1,N));
  22. what = fft(w);
  23. % formal fractional integral
  24. eta = 2 * pi * [0 : (N/2) (-(N/2)+1) : (-1)] ./ N;
  25. eta(1) = 1;
  26. bhat = (abs(eta) .^ (-2*H)) .* what;
  27. bhat(1) = 0.;
  28. fBr = ifft(bhat);
  29. % extract a segment that is well away from the edges
  30. start = floor(par/2 .* n);
  31. stop = start+n-1;
  32. fBr = real(fBr(start:stop));
  33. %
  34. % Part of WaveLab Version 802
  35. % Built Sunday, October 3, 1999 8:52:27 AM
  36. % This is Copyrighted Material
  37. % For Copying permissions see COPYING.m
  38. % Comments? e-mail wavelab@stat.stanford.edu
  39. %
复制代码
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-19 22:36 , Processed in 0.065577 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表