How to do an interpolation on a matrix?
Show older comments
Hello, I used acceleration and position sensors to measure average walking pace. I entered the values in the acceleration time table into variable X, to perform an interpolation, but I get an error
x=timetable2table(Acceleration,'ConvertRowTimes',false);
tmax=50;
t=0:0.1:tmax;
TS=0.05;
steps=interp1(t,x,TS);
1 Comment
Mathieu NOE
on 14 Dec 2021
hello
I don't think that interp1 works directly on tables
try convert x to array using table2array
Answers (1)
KSSV
on 14 Dec 2021
You can convert table to array using table2array. You can access the column of table using x.(1).
x=timetable2table(Acceleration,'ConvertRowTimes',false);
tmax=50;
t=0:0.1:tmax;
TS=0.05;
steps=interp1(t,x.(1),TS);
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!