How to Matching matrix size (add or take away a value)

4 ビュー (過去 30 日間)
Drew Eager
Drew Eager 2021 年 7 月 31 日
回答済み: KSSV 2021 年 7 月 31 日
Hi everyone,
I want to take the results from vx and then apply them to the find ax, but the matrix are different sizes so I am reciving an error. Is the a away to rectify this so i can use the reulting vx matric for the ax eqaution? I cannot figure out how to match the size.
Thanks
Here is the code I am working with.
% x values of particle 1
x = [2.1547 2.1104 2.0498 1.9743 1.8852 1.7843];
% t values of particle 1
t = [0.1346 0.2015 0.2682 0.3345 0.4006 0.4665];
% difference
dx = diff(x);
dt = diff(t);
% vx - velocity in x direction
vx = dx./dt;
% ax - acceleration in x direction
ax = vx./dt;

回答 (1 件)

KSSV
KSSV 2021 年 7 月 31 日
There is no error... If you are finding the difference, have a look on gradient.

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by