24小时热门版块排行榜    

查看: 312  |  回复: 0

Msan

新虫 (初入文坛)

[求助] 急急急。。。出错,求大神提示

%混沌信号================================================
global a;
global b;
global c;
%r=[-c*(x(1)-x(2));a*x(1)-x(2)-x(1)*x(3);b*(x(1)*x(2)-x(3))];
clear;
global a;
global b;
global c;
b=8/3;c=10;a=28;
t0=[0,100];f0=[1,1,1];
Y=[];
    w0=1.2;
    T=2*pi/w0;
  [t,x]=ode45(@lorenz,t0,f0);
  figure(1);
     subplot(2,1,1);
       plot(t,x(:,1));
       x=x(:,1);
       subplot(2,1,2);
       plot(t,x);
%==========================================================
Fs=100;%采样频率
n=0:1/Fs:1;
%产生含有噪声的序列
u=randn(1,length(n));
u=u*sqrt(1);
power_u=var(u);
%================================

%==================================
xn=3*sin(2*pi*5*n);
figure(2);
subplot(2,2,1);
plot(n,xn);

%=======================================
nfft=4096;
cxn=xcorr(xn,\'unbiased\' ); %计算序列的自相关函数
CXk=fft(cxn,nfft);
Pxx=abs(CXk);
index=0:round(nfft/2- 1);
k=index*Fs/nfft;
plot_Pxx=10*log10(Pxx(index+1));
subplot(2,2,2);
plot(k,plot_Pxx);
%==============================================

xn=3*sin(2*pi*5*n)+u;
subplot(2,2,3);
plot(n,xn);
%========================================
nfft=4096;
cxn=xcorr(xn,\'unbiased\' ); %计算序列的自相关函数
CXk=fft(cxn,nfft);
Pxx=abs(CXk);
index=0:round(nfft/2- 1);
k=index*Fs/nfft;
plot_Pxx=10*log10(Pxx(index+1));
subplot(2,2,4);
plot(k,plot_Pxx);
出错提示
??? Error using ==> lorenz
Too many input arguments.

Error in ==> odearguments at 109
f0 = feval(ode,t0,y0,args{:});   % ODE15I sets args{1} to yp0.

Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...

Error in ==> Untitled35 at 15
  [t,x]=ode45(@lorenz,t0,f0);
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 Msan 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 279分求调剂 一志愿211 +9 chaojifeixia 2026-03-19 10/500 2026-03-20 12:29 by lature00
[考研] 一志愿武汉理工材料工程专硕调剂 +7 Doleres 2026-03-19 7/350 2026-03-20 10:39 by EBSD
[考研] 0856调剂,是学校就去 +7 sllhht 2026-03-19 8/400 2026-03-20 09:30 by 每天只摆一小会
[考研] 265求调剂 +6 梁梁校校 2026-03-17 6/300 2026-03-20 08:59 by ZHANG0tao
[考研] 26调剂/材料/英一数二/总分289/已过A区线 +8 步川酷紫123 2026-03-13 8/400 2026-03-20 08:47 by xingguangj
[考博] 东华理工大学化材专业26届硕士博士申请 +8 zlingli 2026-03-13 8/400 2026-03-19 16:32 by 轻松不少随
[考研] 一志愿985,本科211,0817化学工程与技术319求调剂 +10 Liwangman 2026-03-15 10/500 2026-03-19 10:25 by 无际的草原
[考研] 330求调剂 +3 小材化本科 2026-03-18 3/150 2026-03-18 21:55 by 无懈可击111
[考研] 材料专业求调剂 +5 hanamiko 2026-03-18 5/250 2026-03-18 20:19 by 星空星月
[考研] 08工科 320总分 求调剂 +5 梨花珞晚风 2026-03-17 5/250 2026-03-18 14:49 by haxia
[考研] 311求调剂 +6 26研0 2026-03-15 6/300 2026-03-18 14:43 by haxia
[考研] 275求调剂 +4 太阳花天天开心 2026-03-16 4/200 2026-03-17 10:53 by 功夫疯狂
[考研] 11408 一志愿西电,277分求调剂 +3 zhouzhen654 2026-03-16 3/150 2026-03-17 07:03 by laoshidan
[考研] 药学383 求调剂 +3 药学chy 2026-03-15 4/200 2026-03-16 20:51 by 元子^0^
[考研] 321求调剂 +5 大米饭! 2026-03-15 5/250 2026-03-16 16:33 by houyaoxu
[考研] 085601材料工程315分求调剂 +3 yang_0104 2026-03-15 3/150 2026-03-15 10:58 by peike
[考研] 297一志愿上交085600求调剂 +5 指尖八千里 2026-03-14 5/250 2026-03-14 17:26 by a不易
[考研] 复试调剂 +3 呼呼?~+123456 2026-03-14 3/150 2026-03-14 16:53 by WTUChen
[考研] 266求调剂 +4 学员97LZgn 2026-03-13 4/200 2026-03-14 08:37 by zhukairuo
[考研] 招收0805(材料)调剂 +3 18595523086 2026-03-13 3/150 2026-03-14 00:33 by 123%、
信息提示
请填处理意见