如何用Matlab绘出广义Lorenz系统规范式的图形?请高手指教 针对lorenz系统的研究有哪些

\u5229\u7528matlab\u505a\u51fa\u6d1b\u4f26\u8328\uff08Lorenz\uff09\u65b9\u7a0b\u7684\u56fe\u50cf

\u8c03\u7528ODE45\u6765\u89e3\u7b97\u5e38\u5fae\u5206\u65b9\u7a0b\u5c31\u884c
\u5177\u4f53\u4f60\u53ef\u4ee5\u770b\u4e0bmatlab\u7684ode45\u547d\u4ee4\u7684\u5e2e\u52a9

\u3000\u3000\u7f57\u5170\u897f(Lorenz)\uff0c\u610f\u5927\u5229\u5927\u4f17\u54c1\u724c\u3002\u3000\u3000\u7531\u4e8e\u5728\u949f\u8868\u5e02\u573a\u7684\u51fa\u8272\u8868\u73b0\uff0cLORENZ\u5f97\u5230\u4e86\u5e94\u6709\u7684\u8363\u8a89\u30022003\u5e749\u6708\uff0c\u7531\u7c73\u5170\u7701\u5546\u65c5\u8054\u76df\u63d0\u540d\uff0cLORENZ\u88ab\u5f53\u5730\u7684\u5de5\u5bb6\u5546\u8054\u5408\u4f1a\u6388\u4e88\u201c\u7c73\u5170\u5386\u53f2\u4f01\u4e1a\u201d\u79f0\u53f7\u3002

由MATLAB自带的Demo修改了一个,供参考。


关于广义Lorenz系统规范式,参见百度文库:
http://wenku.baidu.com/view/94de6f35ee06eff9aef8071f.html

方程在最后面的函数lorenzeq

function GLCF(action)
% 广义Lorenz系统规范式,由MATLAB自带Demo修改而来
% 参见百度文库:


% 方程在最后面的函数lorenzeq
% Information regarding the play status will be held in
% the axis user data according to the following table:
play= 1;
stop=-1;
if nargin<1,
    action='initialize';
end;
if strcmp(action,'initialize'),
    oldFigNumber=watchon;
    figNumber=figure( ...
        'Name','Lorenz Attractor', ...
        'NumberTitle','off', ...
        'Visible','off');
    colordef(figNumber,'black')
    axes( ...
        'Units','normalized', ...
        'Position',[0.05 0.10 0.75 0.95], ...
        'Visible','off');
    text(0,0,'Press the "Start" button to see the Lorenz demo', ...
        'HorizontalAlignment','center');
    axis([-1 1 -1 1]);
    %===================================
    % Information for all buttons
    labelColor=[0.8 0.8 0.8];
    yInitPos=0.90;
    xPos=0.85;
    btnLen=0.10;
    btnWid=0.10;
    % Spacing between the button and the next command's label
    spacing=0.05;
    %====================================
    % The CONSOLE frame
    frmBorder=0.02;
    yPos=0.05-frmBorder;
    frmPos=[xPos-frmBorder yPos btnLen+2*frmBorder 0.9+2*frmBorder];
    h=uicontrol( ...
        'Style','frame', ...
        'Units','normalized', ...
        'Position',frmPos, ...
        'BackgroundColor',[0.50 0.50 0.50]);
    
    %====================================
    % The START button
    btnNumber=1;
    yPos=0.90-(btnNumber-1)*(btnWid+spacing);
    labelStr='Start';
    cmdStr='start';
    callbackStr='lorenz(''start'');';
    % Generic button information
    btnPos=[xPos yPos-spacing btnLen btnWid];
    startHndl=uicontrol( ...
        'Style','pushbutton', ...
        'Units','normalized', ...
        'Position',btnPos, ...
        'String',labelStr, ...
        'Interruptible','on', ...
        'Callback',callbackStr);
    %====================================
    % The STOP button
    btnNumber=2;
    yPos=0.90-(btnNumber-1)*(btnWid+spacing);
    labelStr='Stop';
    % Setting userdata to -1 (=stop) will stop the demo.
    callbackStr='set(gca,''Userdata'',-1)';
    
    % Generic  button information
    btnPos=[xPos yPos-spacing btnLen btnWid];
    stopHndl=uicontrol( ...
        'Style','pushbutton', ...
        'Units','normalized', ...
        'Position',btnPos, ...
        'Enable','off', ...
        'String',labelStr, ...
        'Callback',callbackStr);
    %====================================
    % The INFO button
    labelStr='Info';
    callbackStr='lorenz(''info'')';
    infoHndl=uicontrol( ...
        'Style','push', ...
        'Units','normalized', ...
        'position',[xPos 0.20 btnLen 0.10], ...
        'string',labelStr, ...
        'call',callbackStr);
    %====================================
    % The CLOSE button
    labelStr='Close';
    callbackStr='close(gcf)';
    closeHndl=uicontrol( ...
        'Style','push', ...
        'Units','normalized', ...
        'position',[xPos 0.05 btnLen 0.10], ...
        'string',labelStr, ...
        'call',callbackStr);
    
    % Uncover the figure
    hndlList=[startHndl stopHndl infoHndl closeHndl];
    set(figNumber,'Visible','on', ...
        'UserData',hndlList);
    watchoff(oldFigNumber);
    figure(figNumber);
elseif strcmp(action,'start'),
    axHndl=gca;
    figNumber=gcf;
    hndlList=get(figNumber,'UserData');
    startHndl=hndlList(1);
    stopHndl=hndlList(2);
    infoHndl=hndlList(3);
    closeHndl=hndlList(4);
    set([startHndl closeHndl infoHndl],'Enable','off');
    set(stopHndl,'Enable','on');
    % ====== Start of Demo
    set(figNumber,'Backingstore','off');
    % The graphics axis limits are set to values known 
    % to contain the solution.
    set(axHndl, ...
        'XLim',[0 40],'YLim',[-35 10],'ZLim',[-10 40], ...
        'Userdata',play, ...
        'XTick',[],'YTick',[],'ZTick',[], ...
        'Drawmode','fast', ...
        'Visible','on', ...
        'NextPlot','add', ...
        'Userdata',play, ...
        'View',[-37.5,30]);
    xlabel('X');
    ylabel('Y');
    zlabel('Z');
    % The orbit ranges chaotically back and forth around two different points,
    % or attractors.  It is bounded, but not periodic and not convergent.
    % The numerical integration, and the display of the evolving solution,
    % are handled by the function ODE23P.
 
    FunFcn='lorenzeq';
    % The initial conditions below will produce good results
    %y0 = [20 5 -5];
    % Random initial conditions
    y0(1)=rand*30+5;
    y0(2)=rand*35-30;
    y0(3)=rand*40-5;
    t0=0;
    tfinal=100;
    pow = 1/3;
    tol = 0.001;
 
    t = t0;
    hmax = (tfinal - t)/5;
    hmin = (tfinal - t)/200000;
    h = (tfinal - t)/100;
    y = y0(:);
    tau = tol * max(norm(y,'inf'),1);
 
    % Save L steps and plot like a comet tail.
    L = 50;
    Y = y*ones(1,L);
 
    cla;
    head = line( ...
        'color','r', ...
        'Marker','.', ...
        'markersize',25, ...
        'erase','xor', ...
        'xdata',y(1),'ydata',y(2),'zdata',y(3));
    body = line( ...
        'color','y', ...
        'LineStyle','-', ...
        'erase','none', ...
        'xdata',[],'ydata',[],'zdata',[]);
    tail=line( ...
        'color','b', ...
        'LineStyle','-', ...
        'erase','none', ...
        'xdata',[],'ydata',[],'zdata',[]);
 
    % The main loop
    while (get(axHndl,'Userdata')==play) & (h >= hmin)
        if t + h > tfinal, h = tfinal - t; end
        % Compute the slopes
        s1 = feval(FunFcn, t, y);
        s2 = feval(FunFcn, t+h, y+h*s1);
        s3 = feval(FunFcn, t+h/2, y+h*(s1+s2)/4);
 
        % Estimate the error and the acceptable error
        delta = norm(h*(s1 - 2*s3 + s2)/3,'inf');
        tau = tol*max(norm(y,'inf'),1.0);
 
        % Update the solution only if the error is acceptable
        ts = t;
        ys = y;
        if delta <= tau
            t = t + h;
            y = y + h*(s1 + 4*s3 + s2)/6;
 
            % Update the plot
            Y = [y Y(:,1:L-1)];
            set(head,'xdata',Y(1,1),'ydata',Y(2,1),'zdata',Y(3,1))
            set(body,'xdata',Y(1,1:2),'ydata',Y(2,1:2),'zdata',Y(3,1:2))
            set(tail,'xdata',Y(1,L-1:L),'ydata',Y(2,L-1:L),'zdata',Y(3,L-1:L))
            drawnow;
        end
 
        % Update the step size
        if delta ~= 0.0
            h = min(hmax, 0.9*h*(tau/delta)^pow);
        end
    end;    % Main loop ...
    % ====== End of Demo
    set([startHndl closeHndl infoHndl],'Enable','on');
    set(stopHndl,'Enable','off');
elseif strcmp(action,'info');
    helpwin(mfilename);
end;    % if strcmp(action, ...

function ydot = lorenzeq(t,y)
% GLCF中,只有一个实标量参数τ,确定系统的混沌行为,而特征值满足一个
% (且只有一个)非常简单的不等式条件:
%      -L2 > L1 > -L3 > 0
L1 = 2;
L2 = -3;
L3 = -1;
T = 1;
A = diag([L1 L2 L3]);
c = [1 -1 0];
B = [0 0 -1; 0 0 -1; 1 T 0];
ydot = A*y + c*y * b * y;

 



  • 璇峰府蹇欑湅鐪嬭繖涓MATLAB绋嬪簭鏈変粈涔堥敊璇 t=0:0.001:2; % 2绉掓椂闀 x=lo
    绛旓細璇蜂綘鎶1.dat鏀规垚x.dat 鐒跺悗 load('d:\x.dat')t=0:0.001:2;plot(t,x)
  • matlab鐨闊充箰淇″彿鐨勫垎鏋愪笌澶勭悊璁捐鐨勫疄楠屽拫鍋?
    绛旓細lohdx=filter(B,A,hdx); %鍒╃敤宸寸壒娌冩柉婊ゆ尝鍣ㄥ鍔犲櫔鍚庨煶涔愪俊鍙疯繘琛屾护娉㈠苟瀵瑰叾鍋%FFT鍙樻崲 M1=length(lohdx); flohdx=fft(lohdx); w4=2/M1*(0:M1/2-1); figure %鐢诲嚭鍔犲櫔鍚庨煶涔愪俊鍙风殑闊抽鍥俱佸反鐗规矁鏂护娉㈠櫒鐨勯鐜囧搷搴旀洸绾 %鍜屾护娉㈠悗闊充箰淇″彿鐨勯璋卞浘 subplot(3,1,1);plot(hdx); subplot(3,1,2)...
  • 璇烽棶濡備綍鍦Matlab涓鏄剧ずdb5灏忔尝鍖3灞傚垎瑙d负8涓鐜囨鐨勫悇绾allat婊ゆ尝鍣...
    绛旓細涓嶇鍒嗚В鍑犲眰锛matlab鐨灏忔尝鍒嗘瀽閮芥槸浣跨敤鍚屼竴涓护娉㈠櫒鐨勶紝棰戠巼娈电殑鍙樺寲鏄娇鐢ㄤ俊鍙风偣鍑忓崐鐨勬柟寮忓疄鐜扮殑锛屼笉鏄娇鐢ㄤ笉鍚屾护娉㈠櫒瀹炵幇鐨勩傞氬父鐨勫皬娉㈠熀鍦ㄥ仛DWT鏃堕兘浼氭湁鍥涗釜婊ゆ尝鍣ㄧ粍鎴愮殑婊ゆ尝鍣ㄧ粍锛屽垎瑙d綆棰戜綆閫氭护娉㈠櫒鍜岄珮棰戝甫閫氭护娉㈠櫒锛屼互鍙婇噸鏋勪綆棰戜綆閫氭护娉㈠櫒鍜岄珮棰戝甫閫氭护娉㈠櫒銆俒Lo_D,Hi_D,Lo_R,Hi_R] =...
  • matlab缂栧啓甯︽湁浼犺緭闆剁偣鐨刢hebyshev甯﹂氭护娉㈠櫒
    绛旓細matlab缂栧啓甯︽湁浼犺緭闆剁偣鐨刢hebyshev甯﹂氭护娉㈠櫒 200 姹備竴涓簮绋嬪簭:瑕佹眰:鐢╩atlab缂栧啓,甯︽湁浼犺緭闆剁偣鐨刢hebyshev甯﹂氭护娉㈠櫒(鍙傛暟涓嶉檺),骞惰兘鎻愬彇鍑鸿﹀悎鐭╅樀M,鑳界粰鍑哄箙棰戝搷搴斿浘銆傝涓嶈浠庣綉涓婃壘涓滆タ绮樿创鍦ㄨ繖,璋㈣阿!... 姹備竴涓簮绋嬪簭:瑕佹眰:鐢╩atlab缂栧啓,甯︽湁浼犺緭闆剁偣鐨刢hebyshev甯﹂氭护娉㈠櫒(鍙傛暟涓嶉檺),骞惰兘鎻愬彇鍑鸿﹀悎...
  • 瀵规椂闂村簭鍒楄繘琛屽皬娉㈠垎鏋,濂囧紓鐐鎬庝箞纭畾,???濡備綍閫氳繃matlab瀹炵幇...
    绛旓細涓嶇敤璋㈡垜锛屾垜鏄浄閿 (1)灏忔尝妯℃瀬澶у奸噸鏋 MATLAB浠g爜_澶╁ぉ鍚戜笂_鏂版氮鍗氬 http://blog.sina.com.cn/s/blog_6c00b0e30100u1s5.html function [signal,swa,swd,ddw,wpeak]=wave_peak(points,level,Lo_D,Hi_D,Lo_R,Hi_R,offset)璇ュ嚱鏁扮敤浜庤鍙杄cg淇″彿锛屾壘鍒板皬娉㈠彉鎹㈡ā鏋佸ぇ搴忓垪 warning off;e...
  • matlab姹傝В浜屾鏂圭▼缁
    绛旓細f1=-i*w*Ps1+Q-(1/Ts+1/Tns)*Ps1+(P1/Te)*(Lw/Ls)-3e23*(1-3e-18*S)*S;f2=-i*w*P1+(Ps1/Ts)*(Ls/Lw)-(P1-P2)/Tc-(1/Tn+1/Te)*P1-3e23*(1-3e-18*S)*S;f3=-i*w*P2+(P1-P2)/Tc-(P2-P3)/Tc-P2/Tn-3e23*(1-3e-18*S)*S;f4=-i*w*P3+(P2-P3)/...
  • 鎬ユ眰濡備綍鐢∕ATLab瀹炵幇EM绠楁硶
    绛旓細04 Dec 2012 Jason Rebello Some people want to know how to view the segmented image. For example suppose you have two classes ie k=2; us the following code to view it [row col] = size(ima);final_img = zeros(row,col);for i=1:row for j=1:col if mask(i,j)==1...
  • matlab瑙f柟绋嬬粍
    绛旓細鐢╯lo鈪磂鍑芥暟灏卞彲浠ヨВ鍐炽傝В鍐崇殑鏂规硶濡備笅 [N1,N2]=solve('N1+N2=a+b','N1-N2=a-b','N1,N2')
  • matlab鐢诲嚭鍥惧悗瀹藉害姣旇緝绐,鎬庢牱灏嗗浘褰㈡暣浣撴斁澶у啀杈撳嚭(涓嶆敼鍙樻í绾佃酱鐨勭浉...
    绛旓細鍐嶇粯鍥惧悗闈紝涓嬮潰璇彞鍚屾瘮渚嬫斁澶т负2鍊嶇殑鍥俱俬 = get(gcf)mysize = h.PaperSize*2; %%%% 鍚屾瘮渚嬫斁澶т袱鍊 set(gcf,'PaperSize',[mysize(1) mysize(2)]);
  • 濡備綍鐢∕ATLAB姹傝В鏂圭▼缁(omiga-sqrt(1/L/C-(num*R)^2/4/L^2)=0...
    绛旓細>> [beta num omiga t0]=solve('omiga-sqrt(1/L/C-(num*R)^2/4/L^2)=0','beta-atan(omiga/(num*R/2/L))=0','t0-beta/omiga=0','Imax-Uin*num/omiga/L*exp(-(num*R/2/L)*t0)*sin(omiga*t0)=0','beta,num,omiga,t0')beta = 0 0 num = 2/C*(L*C)^(1/2)/...
  • 扩展阅读:matlab同时绘制多张图 ... 用matlab设计点名系统 ... 基于matlab的文字识别 ... 新手怎么使用matlab ... matlab元器件大全 ... matlab常用命令大全 ... 利用matlab制作gui界面 ... matlab生成多个figure图 ... 给出数据怎样用matlab绘图 ...

    本站交流只代表网友个人观点,与本站立场无关
    欢迎反馈与建议,请联系电邮
    2024© 车视网