How to plot a large csv file with 3 different functions to plot
2 views (last 30 days)
Show older comments
I have a 101x4 csv file and I am having trouble plotting the 3 lines.This is the code I have so far, can anyone tell me what I have done wrong?
if true
filename='arm_motion_1.csv'
M=csvread(filename, 2,0);
a=filename(:,1); %time in seconds
b=filename(:,2); %angular displacement
c=filename(:,3); %angular velocity
d=filename(:,4); %angular acceleration
plot(a,b,'r')
hold on
plot(a,c,'g')
hold on
plot(a,d,'b')
hold on
title('Raw Kinematics Data on Arm Flexion-Extension')
t=[0:.05:5]
end
0 Comments
Accepted Answer
KSSV
on 4 Oct 2018
filename='arm_motion_1.csv' ;
M=csvread(filename);
a=M(:,1); %time in seconds
b=M(:,2); %angular displacement
c=M(:,3); %angular velocity
d=M(:,4); %angular acceleration
plot(a,b,'r')
hold on
plot(a,c,'g')
hold on
plot(a,d,'b')
hold on
title('Raw Kinematics Data on Arm Flexion-Extension')
t=[0:.05:5]
2 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!