Joint angle values are changing from an initial to a final value with constant velocity in a given time(Given as a loop function). I have to plot a graph of joint angle motion?

조회 수: 6 (최근 30일)
I have to plot a graph of joint angle motion from initial to final value by considering every values assumed by the joint . How it is possible?Any help will be usefull.
  댓글 수: 5
Malu
Malu 2018년 5월 4일
편집: Malu 2018년 5월 4일
I want to plot all the values from initial to final assumed by the joint in a single graph. Those values are obtained from this loop . But when I try to plot it inside the loop, several graphs are coming.If plotted outside ,only initial and final values are plotted in graph..
Ameer Hamza
Ameer Hamza 2018년 5월 4일
from this code, I can't say what does rob.plot do, but hold on should prevent the old graphics objects from being deleted.

댓글을 달려면 로그인하십시오.

답변 (1개)

sloppydisk
sloppydisk 2018년 5월 4일
Please take a look at
doc refreshdata
This will allow you to specify a data source for your plot outside of the loop and update it inside.
  댓글 수: 2
Malu
Malu 2018년 5월 5일
I have tried this sir.But I am plotting the graph of time versus joint position with constant velocity , the graph should consists several diagonal lines . Isn't it? But I am getting graph like this??
sloppydisk
sloppydisk 2018년 5월 5일
Ah I think I have misunderstood your question, I thought you were trying to make an animated graph. Basically you want to plot position as function of time for 5 velocities, right? Something equivalent to this should work:
% time and velocity
t = 0:10;
v = 1:5;
% preallocate x
x = zeros(5, 11);
% find x in a loop
for i = 1:5
x(i, :) = v(i)*t;
end
% plot
plot(x, t)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by