Gharry
2012-05-28, 10:15
求助,我输入以下程序后出现的是未定义的函数和变量t,求助如何修改程序
clc
tspan=[0:0.1:100]
h0=1
Q=10.25989
t1=t
kmrgd=[0.31015095 0 0.12011481 1.1000047];
[t,y]=ode45('V_t_f',tspan,[0.31015095 0 0.12011481 1.0000047 Q])
figure;
%plot(t,y(:,4)) %作图
%hold on;
%plot(t,y) %作图
%plot(y(:,2),y(:,4))
f=[t,y(:,4)];
%%%%%%%%%%%%%%%%%%%%%%%%%%%
t1=10*t;
plot(t1,f(:,2))
L = length(t1)
clc
tspan=[0:0.1:100]
h0=1
Q=10.25989
t1=t
kmrgd=[0.31015095 0 0.12011481 1.1000047];
[t,y]=ode45('V_t_f',tspan,[0.31015095 0 0.12011481 1.0000047 Q])
figure;
%plot(t,y(:,4)) %作图
%hold on;
%plot(t,y) %作图
%plot(y(:,2),y(:,4))
f=[t,y(:,4)];
%%%%%%%%%%%%%%%%%%%%%%%%%%%
t1=10*t;
plot(t1,f(:,2))
L = length(t1)