MATLAB: Hello I couldn’t find the problem can anybody help me

ıt says enter enough ınput

function dx =dif(t,x,)
dx= zeros(3,1); % a column vector
dx(1,1)=0*x(1)-6*x(2)-x(3);
dx(2,1)=-6*x(1)+2*x(2)-16*x(3);
dx(3,1)=-5*x(1)+20*x(2)-10*x(3);
[t,x] = ode45(@dif,[0 5],[1 1 1]);
plot(t,x(:,1),'+',t,x(:,2),'x',t,x(:,3),'o')
xlabel('t')
ylabel('x')

Best Answer

The problem is that you are calling ODE45 from within the function that it will then use.
You should recognize the incestuousness of this. It is a bad thing.
READ THE EXAMPLES FOR ODE45. Try an example yourself. Then try a small problem that you know the answer to.