24小时热门版块排行榜    

查看: 311  |  回复: 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 +8 chaojifeixia 2026-03-19 8/400 2026-03-20 11:29 by lature00
[考研] 298-一志愿中国农业大学-求调剂 +8 手机用户 2026-03-17 8/400 2026-03-20 09:32 by 陆伶越
[考研] 26调剂/材料/英一数二/总分289/已过A区线 +8 步川酷紫123 2026-03-13 8/400 2026-03-20 08:47 by xingguangj
[考研] 一志愿苏州大学材料求调剂,总分315(英一) +3 sbdksD 2026-03-19 3/150 2026-03-19 23:21 by fmesaito
[考研] 0703化学调剂 ,六级已过,有科研经历 +12 曦熙兮 2026-03-15 12/600 2026-03-19 19:42 by maocaozhuxi
[考研] 求调剂 +3 Mqqqqqq 2026-03-19 3/150 2026-03-19 14:11 by peike
[考研] 一志愿武理材料305分求调剂 +5 想上岸的鲤鱼 2026-03-18 6/300 2026-03-18 17:53 by 无际的草原
[考研] 299求调剂 +5 △小透明* 2026-03-17 5/250 2026-03-18 11:49 by 尽舜尧1
[考研] 268求调剂 +6 简单点0 2026-03-17 6/300 2026-03-18 09:04 by 无际的草原
[考研] 278求调剂 +5 烟火先于春 2026-03-17 5/250 2026-03-18 08:43 by 星空星月
[考研] 277调剂 +5 自由煎饼果子 2026-03-16 6/300 2026-03-17 19:26 by 李leezz
[考研] 326求调剂 +5 上岸的小葡 2026-03-15 6/300 2026-03-17 17:26 by ruiyingmiao
[硕博家园] 湖北工业大学 生命科学与健康学院-课题组招收2026级食品/生物方向硕士 +3 1喜春8 2026-03-17 5/250 2026-03-17 17:18 by ber川cool子
[考研] 考研调剂 +3 淇ya_~ 2026-03-17 5/250 2026-03-17 09:25 by Winj1e
[考研] 278求调剂 +3 Yy7400 2026-03-13 3/150 2026-03-17 08:24 by laoshidan
[考研] 318求调剂 +3 Yanyali 2026-03-15 3/150 2026-03-16 16:41 by houyaoxu
[考研] 326求调剂 +3 mlpqaz03 2026-03-15 3/150 2026-03-16 07:33 by Iveryant
[考研] 本科南京大学一志愿川大药学327 +3 麦田耕者 2026-03-14 3/150 2026-03-14 20:04 by 外星文明
[考研] 一志愿哈工大材料324分求调剂 +5 闫旭东 2026-03-14 5/250 2026-03-14 14:53 by 木瓜膏
[考研] 297求调剂 +4 学海漂泊 2026-03-13 4/200 2026-03-14 11:51 by 热情沙漠
信息提示
请填处理意见