Plot velocity vector vs time
조회 수: 9 (최근 30일)
이전 댓글 표시
Hi there,
I have the following task and I don't know how to implement it:

So I have the general solution for the vector
v(t)=(u(t); v(t); w(t))
which is
v=-inv(phiRV)*phiRR*dr0
where phiRV, phiRR are time-dependent 3x3-matrices and dr0 is another 3x1-vector.
Now I have to calculate v for each t=1:1200:1200.
As you can guess, so far I haven't succeeded. One problem is that I don't really have an idea what the plot should look like, I have never done something like this before. And then there's the implementation code-wise, of course.
I hope you can help me with that, thank you! :)
댓글 수: 0
답변 (1개)
Image Analyst
2017년 10월 1일
You don't do this:
t=1:1200:1200;
you do this:
t=1:1200;
Then to plot v vs. t, do this:
plot(t, v, 'b-', 'LineWidth', 2);
grid on;
title('v vs. t', 'FontSize', 20);
xlabel('t', 'FontSize', 20);
ylabel('v', 'FontSize', 20);
Assuming your equation for v is really delta v. Otherwise we need to know what the delta is from, like v(0) or is it the prior v, like you'd get from diff(v).
댓글 수: 4
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


