How to extract data from a plot?
조회 수: 1 (최근 30일)
이전 댓글 표시
I got a velocity plot from the acceleration and duration, shown as above. The code is shown as below.
Filename='cycles_ece'
U=xlsread(Filename, 'Table 1');
a_u=U(1:18,4);
t_u=U(1:18,6);
E=xlsread(Filename, 'Table 2');
a_e=E(1:18,4);
t_e=E(1:18,6);
a=[a_u;a_u;a_u;a_u;a_e];
delt=[t_u;t_u;t_u;t_u;t_e];
v=zeros(size(a));
t=zeros(size(delt));
x=-zeros(size(a))
n=numel(a);
for i=1:n
if i==1
v(i)=a(i).*delt(i);
t(i)=delt(i);
else
v(i)=(v(i-1)+a(i).*delt(i));
t(i)=t(i-1)+delt(i);
end
end
plot(t,v)
grid
xlabel('time s')
ylabel('velocity)
Now I want to get the velocity value of every second, i.e. about 1200 points.
So how could I get those values?
Many thanks.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!