- #1
oby7842
- 11
- 0
I am trying to solve set of implicit differential equations. But first...i need to find out the consistent initial conditions for my problem( initial condition for derivative). that's why i am using 'decic' built-in function of matlab. But facing following problem. My set of differential equations function is :
function res=sample(t,z,zdot)
res=0;
res=[zdot(1);zdot(2)]-[z(2); -1.96*sin(z(1))];
script file from which I am running 'decic' function is as follows:
clc;
clear;
tspan=[0:2:20];
z0=[1;0];
t0=[0;0];
zdot0=[0;0];
[z0,zdot0]=decic('sample',t0,z0,1,zdot0,0)
but I am getting following error message:
? Error using ==> decic at 45
Cannot specify more than 2 components of y0 and yp0.
Error in ==> solver_sample at 8
[z0,zdot0]=decic('sample',t0,z0,1,zdot0,0)
Can't I solve consistent initial condition's with decic function??
I will appreciate any help regarding this. thanks for reading my problem.
regards
Omar
function res=sample(t,z,zdot)
res=0;
res=[zdot(1);zdot(2)]-[z(2); -1.96*sin(z(1))];
script file from which I am running 'decic' function is as follows:
clc;
clear;
tspan=[0:2:20];
z0=[1;0];
t0=[0;0];
zdot0=[0;0];
[z0,zdot0]=decic('sample',t0,z0,1,zdot0,0)
but I am getting following error message:
? Error using ==> decic at 45
Cannot specify more than 2 components of y0 and yp0.
Error in ==> solver_sample at 8
[z0,zdot0]=decic('sample',t0,z0,1,zdot0,0)
Can't I solve consistent initial condition's with decic function??
I will appreciate any help regarding this. thanks for reading my problem.
regards
Omar