Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Help animating a 2D line plot from

조회 수: 2 (최근 30일)
Mack Duffy
Mack Duffy 2019년 12월 1일
마감: MATLAB Answer Bot 2021년 8월 20일
My question is how do I create an animation from X abd Y? Please help ASAP
function [G] = position_vs_time_graph (init,dt,sumF, T)
states = spring_trajectory (init,dt, sumF, T);
X = [states.t]';
Y = [states.p]';
G = plot(X,Y);
title('Plot of Position Verse Time');
xlabel('Time (Seconds)');
ylabel('Position (Meters)');
legend('Position in Time','location','southeastoutside');
end
%inputs are the initial conditions (init), dt which is the time step,
%sumF which is the function that represents the sum of the forces, and T
%which is total time.
%initial conditions are mass (m), drag (b), position (p), time (t), and
%velocity (v).
%Output is a graph which shows the relationship in postion verse time.
  댓글 수: 1
darova
darova 2019년 12월 2일
DId you use plot?

답변 (1개)

Anmol Dhiman
Anmol Dhiman 2019년 12월 4일

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by