Post subject: solving matrices in terms of variables with matlab
Posted: Mon 03-21-2005 11:42PM
Major General
Joined: Sat 03-09-2002 12:57PM Posts: 2026
Source: Sigma Nu
so i'm taking ME349 robotic manipulators this semester, and it involves a shitload of matrix multiplication. not like 3x3*3x1 or anything, i'm talking 6 4x4 matrices multiplied together, each with sine theta cosine theta a and d terms in them. i COULD do this in my TI89, but you can imagine how long it takes to type this shit out on a fucking calculator. i can't figure out how to get matlab to solve a matrix in terms of variables, i just get "d is not a defined variable" does anyone know if there is a way to get matlab to crank all these matricies out to get a 4x4 matrix with 902348 fucking terms in it? (because i know it will be that big, despite how many zeroes and ones are in it)
Joined: Tue 09-11-2001 2:34PM Posts: 1084 Location: Off Campus (i.e. not hell)
Source: Off Campus
I really have no idea what you just said.
But Matlab <3's matrices. It's what it's built for. It will multiply the matrices no problem, so then you just get a 4X4 matrix. If you're looking to solve with row reductions, try the command rref (i think).
Ex:
You have matrices A, B, C, and D (all 4x4, or other such multipliable)
And you have an answer matrix which is 4 rows by 1 column of the desired answers.
yeah, but that is for a matrix of say [1,2;3,4]. i'm looking for a matrix of [cos(t1),-sin(t1);a1,d1]*[-cos(t2),sin(t2);a2,0]=ANS, where ANS is in terms of t1, t2, a1, a2, and d1.
BAM! thanks guys. i had tried using "global variables" but they were being defined as 1x1 matrices of empty value, causing a vert_cat error. i had searched help for "variables" but hadn't found any of this symbolic shit. i'm definatl going to give it a try though!
its just too bad that my syms are going to be th1-6, a1-6 and d2-5
Well, there's only so much you can expect it to do.
You might try simplifying each individual step:
<ul>
tmp1=simplify(A1*A2);
tmp2=simplify(tmp1*A3);
...
etc.
</ul>
It might not be any better, but it's worth a try.
simplify and simple are different commands.
Take a look at the help on simple and it lists the
different techniques that it uses. It might be helpfull
to call them directly (collect, combine, convert, etc.)
Aside from all THIS, though, how you liking the Robotic Manipulators class? It's one I'm half thinking about taking when I get up there.
i like it, but there are some things in the class that straight up get on my nerves (like this shit, for example). the lab is fun at first, but then a pain. programming a robot to pick up blocks from one pallet and place them in another is fun. then you program it to pick up from a conveyor, and from arbitrary locations using a camera to detect the blocks. but writing the labs is a pain in the butt because you have to describe every damn part of the program and what it does "; this line asks the user if he wants to proceed" yeah no shit. the test was redic. easy (72/75) but the homework is a lot like dalton's 279 homework-- you spend 3 hours on it and get 10/40 points on it. and then some shit like this... i don't even know how this is physically possible to do. not only is this hard, but i have to mutiply it by each of the inverses and solve for thetas. yes, i have to solve this monster for theta1-6.
that mechatronics class sounds cool, but they are just NOW offering it...
i heard its about integration between mechanical, electronicics, control systems and some other stuff. i think anyone in MAEEM can enroll in it, it's going to be ME301.... what i gathered from an email i read.
is there anyway matlab can convert this shit into like cos(t1+t2+t3) or whatever? i think if i did that it might help..... but that's a whole lot of trig that i don't know how to do / am not willing to do by hand
Users browsing this forum: No registered users and 3 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum