Control system programming using MATLAB.
State space model (two-dimensional): X (t) = X (t-1) + v * dt The position coordinates of X (t) given by the formula like
I'm doing a plot on a graph using for minutes to check the robot's trajectory.
However, since plot is used, the trajectory is represented by "points" in the graph.
Somehow, I want to connect the dots and express the trajectory with "lines", but it doesn't work.
Please tell me if there is any way.
Implemented code (image)
for t 1:50
X (t) = X (t-1) + v * dt;
plot (X (t))
It looks like this. Thank you.
Answer # 1
v is assumed to be a scalar.
X = initial value
for t = 1: 50
X (t + 1) = X (t) + v * dt;
plot (1:51, X, '-o')
When v is 2D
X = [0;0];% Example
dt = 0.1;
v = [1;0.1];% example
for t = 1: 50
X (:, t + 1) = X (:, t) + v * dt;
plot (X (1, :), X (2, :), 'o-')
- about the position of points in the graph by matlab
- matlab - i want to know the formula of the graph obtained by machine learning i want to add an explanatory variable
- html - [beginner] about side by side flexbox
- pdf - i'm a python3 beginner please tell me about substitution
- c - about the meaning of if (assignment expression)
- python - about matplotlib graph fill
- python - about lbp feature extraction (beginner)
- about lambda expression java
- i am a beginner question about python i got an error when doing len
- php - about regular expression of preg_match