get the regular interval x-value in data set

Hello,
Here is the my data set. These are vehicle distance (x-value), and vehicle velocity (y-value).
the x-value is sampled irregularly.
x_distance y_velocity
0.52299 0.000237
1.04598 0.041598
1.56897 0.005755
2.09196 0.012987
2.614949 0.009894
3.137939 0.050168
3.660929 0.00584
4.183919 0.045582
4.706909 0.00007
5.229899 0.054282
5.752889 0.002132
6.275879 2.508755
6.798868 3.193212
7.321858 3.460158
7.844848 3.206859
8.367838 2.923524
8.890828 2.23533
9.413818 1.127799
9.936808 0.429399
10.459798 0.814943
I need to get the regular interval x-value in my data set
for example, if the interval of x-value is 0.3meter
x_distance y_velocity
0.3 0.xxxx
0.6 0.xxxx
0.9 0.xxxx
1.2 0.xxxx
please help...

댓글 수: 4

Are you assuming a linear relationship in your data?
no the data is nonlinear.
How should one go about estimating the velocity values then?
Sorry, I didn't get the exact point of your question.
I assume interpolation btw two x-value.

댓글을 달려면 로그인하십시오.

답변 (1개)

David Hill
David Hill 2020년 12월 9일

0 개 추천

You should look at interp1() function.

댓글 수: 1

Sudhir Rai
Sudhir Rai 2021년 3월 11일
it is not interpolation.
It is actually selecting data point at fixed interval from given matrix of x and v.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

질문:

2020년 12월 9일

댓글:

2021년 3월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by