Error using plot Conversion to double from sym is not possible.
1 view (last 30 days)
Show older comments
syms T t0 D V Sv Sy y0 v0 Lamday LamdavT t
T = t0 + D/V; % We Define T as the final time at wich two objects will have the same distance
MatrixA = [Sv+T T*(Sv*T/2); -T^2/2 Sy-T^3/6];
DeterminantA = (Sy + T^3/3)*(Sv + T) - T^4/4
initials =[y0; v0];
Lamda = [Lamday; LamdavT];
Lamda = (MatrixA * initials)/DeterminantA
vt = v0 - t*(LamdavT + T*Lamday) + (T.^2)/2 * Lamday % we define v(t) as the velocity at any time t
yt = y0 + t*v0 - (t.^2)/2 *(LamdavT + T*Lamday) + (t.^3)/6 * Lamday
LamdavT = Sv*vt;
Lamday = Sy*yt;
t = 1:9;
y0=0; v0=0; t0=0; D =3; V = 2;
y1 = y0 + t*v0 -(t.^2)/2 *(1.5 + T * 0.5) + (t.^3)/6 * 0.5;
plot(t,y1)
0 Comments
Accepted Answer
More Answers (1)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!