I want to rotate a 2d array by a certain angle. I can use teh rot90 command and rate 90 degrees but I'm not able to figure out a way to rotate it by like say 60degrees..
12/3/2008 8:49:37 AM
multiply the rot90 command by 2/3 to get your 60° rotation
12/3/2008 9:40:59 AM
You realize that rot90 physically rotates the matrix? Like if you had written it on paper and then rotated the paper 90 degrees.|1 2 3||4 5 6|it would return|3 6||2 5||1 4|In short there is no such thing as rotating it anything other than a factor of 90deg.So I assume you are rotating a vector? If so then you multiply by the rotation matrix IIRC.
12/3/2008 10:01:45 AM
^ yea thats what I meant..how do I get teh IIRC thing?
12/3/2008 10:51:50 AM
you know iirc = if i remember correctly, right?
12/3/2008 11:00:26 AM
12/3/2008 11:04:42 AM
Yea I'm sure googling "rotation matrix iirc" didn't help you much so:http://mathworld.wolfram.com/RotationMatrix.html
12/3/2008 11:08:05 AM
12/3/2008 11:45:55 AM
If you have the image processing tool box the imrotate command should do what you want.
12/3/2008 12:00:51 PM
robotics toolbox has them toorotx, roty, and rotz
12/3/2008 12:11:26 PM
I have another question.. does anyone here know how to solve second order differential equations in Matlab? I need to solve three 2nd order equations.. I've broken them down to six 1st order equations and solved them.. m not sure if my solution is right..
1/14/2009 11:14:49 AM
^ Look under MATLAB help in the following section:MATLAB -> Mathematics -> Differential Equations -> *All the functions available to you, their syntax, and how to apply them to your particular types of equations is all spelled out in great detail.
1/14/2009 12:38:16 PM