Compute and plot error of data at different sampling rate
古いコメントを表示
Hello,
I’m running into a issue where I have two sets of data that describe the same system but at different sample rates, for example moving from 0 to 5:
A=[012345] B=[0 3 5]
I hope to compute the error between the two set of data over time and so far the answers I found online is using linspace to plot the two data sets so they match up but I am wondering if there is a way to find the error between the two data.
I thought about doing interpolation but apparently seems like only integers is allowed not double. Maybe I am doing it wrong.
More context: the higher sample rate data is a trajectory sent to the robot and the lower sample rate data is the actual position of the joint. These values are all doubles, the number of trajectory data points is 10 point something (not integer) more than the actual position data points. I want to plot the error to figure out the control error. Using linspace I can line up the two plots really, but I can’t find a way to compute the error.
Any suggestion is appreciated, thank you!
2 件のコメント
KSSV
2020 年 6 月 29 日
I thought about doing interpolation but apparently seems like only integers is allowed not double.
No interpolation is allowed in double.
You can do interpolation to your problem and get them to the same dimensions and proceed with error.
Ameer Hamza
2020 年 6 月 29 日
Are both signals sampled at a constant sampling rate? It seems that between 0 to 3, there are three samples for signal A and between 3 to 5, there are two samples. If they are sampled at a variable rate, do you have the time-stamp corresponding to each sample?
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!