Hi Pavel,
You can specify the initial condition for velocity(Z_Dot) and acceleration (Z_DDot) in the following way:
1. While defining the equation, these derivatives will be incorporoated using the diff keyword in the equation as follows:
eqn = M*diff(Z,t,2) + C*diff(Z,t,1) + K * Z == F;
2. Then you can assign some variable names to the derivatives:
Z_Dot = diff(Z,t,1);
Z_DDot = diff(Z,t,2);
3. Finally, you can provide the initial values and plug the eqn and the initial condition cond into the dsolve command to solve your equation:
cond = [Z(0)==Z0, Z_Dot(0)==Z_Dot0, Z_DDot(0)==Z_DDot0];
ZSol(t) = dsolve(eqn,cond);
Refer to the following documentation which shows an example for the same: