How to count steps represented by the acceleration data given in text file?
3 views (last 30 days)
Show older comments
i have a acceleration data in text file. im tryin to read this text file and make a count steps plot, but i couldn't. and the output should look like this:
0 Comments
Accepted Answer
Alan Stevens
on 4 Jan 2023
Edited: Alan Stevens
on 4 Jan 2023
Like this (you can plot the other two - look up help on subplot):
M = csvread('walking.txt');
x = M(:,1); y = M(:,2); z = M(:,3);
t = 1:numel(x);
plot(t,x,t,y,t,z)
xlabel('time'), ylabel('acceleration')
legend('x','y','z')
More Answers (0)
See Also
Categories
Find more on Annotations 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!