Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Help animating a 2D line plot from

2 Ansichten (letzte 30 Tage)
Mack Duffy
Mack Duffy am 1 Dez. 2019
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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 Kommentar
darova
darova am 2 Dez. 2019
DId you use plot?

Antworten (1)

Anmol Dhiman
Anmol Dhiman am 4 Dez. 2019

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by