How to perform an interpolation for Cartesian coordinates?
古いコメントを表示
Hi everybody, I am working on a table containing Cartesian coordinates (X,Y,Z). These coordinates represents the trajectory of a vehicle. The measurement rate is 12 measurements per minute (one measurement every 5 seconds). I would like to perform an interpolation in such a way that I get one measurement per second. I have tried to use "interp3" and "griddedInterpolant" but frankly the syntax is quite complex for a beginner. If someone takes the time to help me, I would be grateful. Best regards !!!
採用された回答
その他の回答 (1 件)
KSSV
2018 年 4 月 18 日
t = 0:5:2*60 ; N = length(t) ; x = cos(t) ; y = sin(t) ; z = 2*t ; plot3(x,y,z)
% Do inteprolation ti = min(t):1:max(t) ;
xi = interp1(t,x,ti) ; yi = interp1(t,y,ti) ; zi = interp1(t,z,ti) ;
hold on plot3(xi,yi,zi,'.r')
4 件のコメント
MOHAMED BEN STA
2018 年 4 月 18 日
KSSV
2018 年 4 月 18 日
I have given a pseudo code.....so that by understanding this..you can code your case.
MOHAMED BEN STA
2018 年 4 月 18 日
編集済み: MOHAMED BEN STA
2018 年 4 月 18 日
KSSV
2018 年 4 月 18 日
Thanking is accepting or voting the answer..:)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!