哪位大神帮忙解决一下这个MATLAB问题,我是小白,下面是程序和它出错的地方 50
%Problem2.61cs:Haykin%Phaselockloopandcycleslipping%M.Sellathurai%timeintervalt0=0;tf...
% Problem 2.61 cs: Haykin% Phase lock loop and cycle slipping% M.Sellathurai % time intervalt0=0;tf=25; %frequency step =0.125 HZdelf=0.125;u0=[0 -delf*2*pi];[t,u]=ode23('lin',[t0 tf],u0);plot(t,u(:,2)/2/pi+delf);xlabel('Time(s)');ylabel('f_i (t),(Hz)');pause; % frequency step =0.51 Hzdelf=0.5;u0=[0 -delf*pi*2]';[t,u]=ode23('lin',[t0 tf],u0);plot(t,u(:,2)/2/pi+delf);xlabel('Time(s)');ylabel('f_i (t),(Hz)');pause; % frequency step =7/12 Hzdelf=7/12;u0=[0 -delf*pi*2]';[t,u]=ode23('lin',[t0 tf],u0);plot(t,u(:,2)/2/pi+delf);xlabel('Time(s)');ylabel('f_i (t),(Hz)');pause; % frequency step =2/3 Hzdelf=2/3;u0=[0 -delf*pi*2]';[t,u]=ode23('lin',[t0 tf],u0);plot(t,u(:,2)/2/pi+delf);xlabel('Time(s)');ylabel('f_i (t),(Hz)'); function uprim=lin(~,u)% used in Problem 2.61,cs;Haykin% PLL% Transfer function (1+as)/(1+bs),% gain k=50/2/pi,% natural frequency 1/2/pi % damping 0.707% Mathini Sellathurai uprim(1)=u(2);uprim(2)=-(1/50+1.2883*cos(u(1)))*u(2)-sin(u(1));uprim=uprim';end错误:错误使用 feval未定义函数或变量 'lin'。出错 odearguments (line 90)f0 = feval(ode,t0,y0,args{:}); % ODE15I setsargs{1} to yp0.出错 ode23 (line 114) odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);出错 Untitled2 (line 11)[t,u]=ode23('lin',[t0tf],u0);plot(t,u(:,2)/2/pi+delf); >>
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |