Matlab里求函数导数图象的问题function I1=illbird(t,I1) %定义微分方程k1=0.5;I1=(k1*I1*(1-I1))';day=0:50;I10=0.002;[t,I1]=ode45('illbird',day,I10);[t,I1] plot(t,I1),grid,pausedI1=diff(I1)plot(t,dI1),grid只出来一张图,为什么?错误Error using ==> plotVectors must be the same lengths.

问题描述:

Matlab里求函数导数图象的问题
function I1=illbird(t,I1) %定义微分方程
k1=0.5;
I1=(k1*I1*(1-I1))';
day=0:50;
I10=0.002;
[t,I1]=ode45('illbird',day,I10);[t,I1]
plot(t,I1),grid,pause
dI1=diff(I1)
plot(t,dI1),grid
只出来一张图,为什么?
错误
Error using ==> plot
Vectors must be the same lengths.