Numerical Differentiation in for loop
이전 댓글 표시
I have solved for the end point positions of an end effector of a robot and I am now looking to find the joint and end point velocities. I have created a for loop to solve for the thetas and endpoint position on the robot.
tt=t0:0.05:tf;
for ii=1:length(tt)
end
I ended up getting this but it does not work in the for loop. Rather it does after I take it out of the for loop and put it back in,but I cannot call on any of the instances. I used some form of diff() function but that didn't work either.
thetadot1 = gradient(theta1inv(:)) ./ gradient(tt(:));
I need it to work in the for loop because I am essentially trying to do this.

The theta and theta_dot are changing. I would like to determine endpoint and joint velocity and eventually call on them so I can plot velocity vs time for each.
댓글 수: 4
David Hill
2020년 6월 17일
Please describe your inputs or provide and example of your inputs and explain what outputs you are trying to get.
David Fariyike
2020년 6월 17일
David Hill
2020년 6월 17일
Are your inputs arrays? It would be beneficial to buffer and accumulate arrays of inputs at your sample rate. Processing would be much more efficient. I was assuming your inputs were arrays.
David Fariyike
2020년 6월 17일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Robotics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!