save spacific entity from matrix

a1=input('give vale if th_1:');
a2=input('give vale if th_2:');
a3=input('give vale if th_3:');
th_1= (a1*pi/180)
th_2= (a2*pi/180);
th_3= (a3*pi/180);
L(1) = Link([ 0 0 20 0 0], 'standard');
L(2) = Link([ 0 0 20 0 0], 'standard');
L(3) = Link([ 0 0 20 0 0], 'standard');
Rob=SerialLink(L);
Rob.name='user nput rob';
Rob.plot([th_1 th_2 th_3]);
T=Rob.fkine([th_1 th_2 th_3])
i have tis code when i run this code it give T 4*4 matrix but when i try to save specifix entities from
T matrix it will give error"Index in position 1 exceeds array bounds (must not exceed 1)"
for saving entity i use this command
h=T(1,4); kindly help

3 Comments

Which of his toolbox release versions are you using (just in case it makes a difference) ?

Answers (1)

After your
T=Rob.fkine([th_1 th_2 th_3]);
Add
TM = T.T;
Now you can access TM(1,4)

6 Comments

thank you so much sir it work for me.can you explane it to understand the problem?
i think i am using (10.3.1 version) this name is written on folder
Sir thankyou for your time.
sir i want to now that i have fixed manipulator as shown in above code How can
I change the base positon in figure and want to see just top view ? basicaly i want that my robot is positioned at x=70 and y= 70 so ican easily see all configration point round it.Again thank to you for helping me
Have A Nice Day!
Your variable T is not an array of double. It is an objectoof class S5E (or something similar) which has been defined to have a display() method that displays it T property.
Sorry, I do not know how to use this toolbox.
ok thankyou for your time

This question is closed.

Products

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!