24小时热门版块排行榜    

查看: 3390  |  回复: 31
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

zyj8119

木虫 (著名写手)

[交流] 【讨论】MC学习专题 已有13人参与

回复此楼
好好学习,天天向上。
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zyj8119

木虫 (著名写手)

引用回帖:
Originally posted by zh1987hs at 2010-09-11 13:57:17:

希望您以后可以再这个帖中丰富完善对MC模拟的一些知识,争取对新入门的虫友有所裨益。

好的,再接再厉!
好好学习,天天向上。
3楼2010-09-11 14:17:49
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 32 个回答

zh1987hs

金虫 (著名写手)

分子模拟新手

★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
lei0736(金币+1):谢谢 2010-09-11 16:32:55
引用回帖:
Originally posted by zyj8119 at 2010-09-11 11:37:37:
我把我前面转载的帖子汇总了下:
1.http://muchong.com/bbs/viewthread.php?tid=2383706&fpage=1
2.http://muchong.com/bbs/viewthread.php?tid=2383749&fpage=1
3.[url]http://emu ...

希望您以后可以再这个帖中丰富完善对MC模拟的一些知识,争取对新入门的虫友有所裨益。
2楼2010-09-11 13:57:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

made21

银虫 (初入文坛)


小木虫(金币+0.5):给个红包,谢谢回帖交流
楼主好人啊,回去慢慢学习!
4楼2010-09-11 16:18:39
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zyj8119

木虫 (著名写手)

【转】(分形)布朗运动的Matlab生成代码

★ ★ ★ ★
lei0736(金币+4):谢谢 2010-09-11 21:48:31
引用回帖:
Originally posted by zyj8119 at 2010-09-11 11:37:37:
我把我前面转载的帖子汇总了下:
1.http://muchong.com/bbs/viewthread.php?tid=2383706&fpage=1
2.http://muchong.com/bbs/viewthread.php?tid=2383749&fpage=1
3.[url]http://emu ...

生成(分形)布朗运动的近似方法主要有随机中点位移法(RMD),快速付立叶换(FFT),后者精度很高且性能好。我所写代码是paxson论文中的S语言代码翻译过来的,希望对大家有所帮助。
CODE:
function similar_sequence = generator_FFT(n,H)  
%--------------------------------------------------------------------------  
% GENERATOR_FFT Use fast fourier transform to generate normalized FGN   
%     and FBM. Then use Norrs method to generate normalized  
%     similar_sequence. Finally, the average of similar_sequence was set to
%     1 through normaliztion.
%  
%     Note:   
%     1. The input argument n is the number of point of sequence. It must   
%     be even. H is the objective similarity you want.   
%     2. The output argument similar_sequence is a similar_sequence with   
%     average equal to 1. The FGN and FBM are normalized FGN and FBM
%     respectively.   
%     3. This routine is a matlab version of paxson's R routine. For more  
%     details, see "Fast, approximate synthesis of fractional Gaussian   
%     noise for generating self-similar network traffic"
%--------------------------------------------------------------------------

%--------------------------------------------------------------------------  
%  
%    generator_FFT  
%    Edit by Chu Chen, 07/07/2007  
%    Should you have any suggestion for improving the code, please contact:  
%    chuch@scut.edu.cn.   
%--------------------------------------------------------------------------  

if mod(n,2) ~= 0
    error('The input argument "n" must be even');  
else   
    % Returns a Fourier-generated sample path of a "self similar" process
    % Consisting of n points(n should be even) and Hurst paramenter H  
    n = n/2;  
    lambda = [1:n]*pi/n;   
  
    % Approxiamte ideal power spectrum.
    f = FGNspectrum(lambda,H);  

    % Adjust for estimating power spectrum via periodogram
    f = f.*exprnd(1,1,n);

    % Construct corresponding complex numbers with randm phase   
    alpha = 2*pi.*unifrnd(0,1,1,n);   
    a = sqrt(f).*cos(alpha);   
    b = sqrt(f).*sin(alpha);   
    z = complex(a,b);

    % Last element should have zero phase  
    z(n) = abs(z(n));   

    % Expand z to correspond to a Fourier transform of a real-valued signal.  
    zprime = [0,z,conj(fliplr(z(1:n-1)))];

    % Inverse FFT gives sample path.   
    FGN = real(ifft(zprime));  
      
    % Standardize FGN and create FBM.
    FGN = (FGN-mean(FGN))/std(FGN);   
    FBM = cumsum(FGN);   
  
    % Use Norrs method to generate normalized similar_sequence   
    similar_sequence = FGN;  
     
    % M = 30;
    % a = 5;  
    % similar_sequence = M + sqrt(a*M)*similar_sequence;  
    % similar_sequence = max(0,similar_sequence);  
    % similar_sequence = similar_sequence*2*n/sum(similar_sequence);
end;


%----------------------------subfunction1----------------------------------  
function f = FGNspectrum(lambda,H)   
% Returns an approximation of the power spectrum of FGN at the given
% frequencies lambda and the given Hurst parameter H.   
f = 2*sin(pi*H)*gamma(2*H+1).*(1-cos(lambda)).*(lambda.^(-2*H-1) + FGNest(lambda,H));
  
%----------------------------subfunction2----------------------------------  
function est = FGNest(lambda,H)   
% Returns the estimate for B(lambda,H).  
d = -2*H-1;
dprime = -2*H;   
a1 = 2*1*pi+lambda;
b1 = 2*1*pi-lambda;
a2 = 2*2*pi+lambda;
b2 = 2*2*pi-lambda;
a3 = 2*3*pi+lambda;
b3 = 2*3*pi-lambda;
a4 = 2*4*pi+lambda;   
b4 = 2*4*pi-lambda;  
est = a1.^d + b1.^d + a2.^d + b2.^d + a3.^d + b3.^d + (a3.^dprime+b3.^dprime+a4.^dprime+b4.^dprime)/(8*pi*H)

[ Last edited by zyj8119 on 2010-9-11 at 21:34 ]
好好学习,天天向上。
5楼2010-09-11 21:32:23
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 一志愿吉林大学材料学硕321求调剂 +9 Ymlll 2026-03-18 12/600 2026-03-20 00:01 by 23Postgrad
[考研] 梁成伟老师课题组欢迎你的加入 +9 一鸭鸭哟 2026-03-14 11/550 2026-03-19 17:22 by !本暗一次!
[考博] 东华理工大学化材专业26届硕士博士申请 +8 zlingli 2026-03-13 8/400 2026-03-19 16:32 by 轻松不少随
[考研] 招收调剂硕士 +4 lidianxing 2026-03-19 10/500 2026-03-19 16:05 by 余麟余
[考研] 085600材料与化工调剂 324分 +10 llllkkkhh 2026-03-18 12/600 2026-03-19 14:33 by llllkkkhh
[考研] 286求调剂 +6 lemonzzn 2026-03-16 10/500 2026-03-19 14:31 by lemonzzn
[考研] 324分 085600材料化工求调剂 +3 llllkkkhh 2026-03-18 3/150 2026-03-19 14:22 by houyaoxu
[考研] 0703化学调剂 +5 pupcoco 2026-03-17 8/400 2026-03-19 13:58 by houyaoxu
[考研] 一志愿福大288有机化学,求调剂 +3 小木虫200408204 2026-03-18 3/150 2026-03-19 13:31 by houyaoxu
[考研] 304求调剂 +6 司空. 2026-03-18 6/300 2026-03-18 23:03 by 星空星月
[考研] 331求调剂(0703有机化学 +7 ZY-05 2026-03-13 8/400 2026-03-18 14:13 by 007_lilei
[考研] 265求调剂 +3 梁梁校校 2026-03-17 3/150 2026-03-18 09:12 by zhukairuo
[考研] 268求调剂 +6 简单点0 2026-03-17 6/300 2026-03-18 09:04 by 无际的草原
[考研] 268求调剂 +8 一定有学上- 2026-03-14 9/450 2026-03-17 17:47 by laoshidan
[考研] 332求调剂 +6 Zz版 2026-03-13 6/300 2026-03-17 17:03 by ruiyingmiao
[考研] 11408 一志愿西电,277分求调剂 +3 zhouzhen654 2026-03-16 3/150 2026-03-17 07:03 by laoshidan
[基金申请] 今年的国基金是打分制吗? 50+3 zhanghaozhu 2026-03-14 3/150 2026-03-16 17:07 by 北京莱茵润色
[考研] 求老师收留调剂 +4 jiang姜66 2026-03-14 5/250 2026-03-15 20:11 by Winj1e
[考研] 0856专硕279求调剂 +5 加油加油!? 2026-03-15 5/250 2026-03-15 11:58 by 2020015
[考研] 中科大材料专硕319求调剂 +3 孟鑫材料 2026-03-13 3/150 2026-03-14 18:10 by houyaoxu
信息提示
请填处理意见