Prev: setting color with data
Next: Oracle DB
From: ImageAnalyst on 7 May 2010 17:54 On May 7, 4:22 pm, "Bruno Luong" <b.lu...(a)fogale.findmycountry> wrote: > ImageAnalyst <imageanal...(a)mailinator.com> wrote in message <7a9c02de-fbba-40f5-a470-4347509b2...(a)d39g2000yqa.googlegroups.com>... > > If you have the Image Processing Toolbox, you can consider your matrix > > as an image and use imrotate() to rotate it around the Z axis (i.e. > > spinning in the x-y plane). > > You can't do that: OP's matrix contains 3D coordinates of points, it is not an image. > > Bruno ------------------------------------------------------------------------------- Sorry - I guess misunderstood what he wanted to do. All I saw was that A was a 6 by 3 2D matrix and I thought that the values were the matrix values, but it appears that they are actually (x,y,z) points and so A really describes a cluster of points in 3D, as you point out.
From: John Dim on 10 May 2010 07:26 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <7ac80860-dfb2-4aa3-9812-75628553b17c(a)q30g2000yqd.googlegroups.com>... > On May 7, 4:22 pm, "Bruno Luong" <b.lu...(a)fogale.findmycountry> wrote: > > ImageAnalyst <imageanal...(a)mailinator.com> wrote in message <7a9c02de-fbba-40f5-a470-4347509b2...(a)d39g2000yqa.googlegroups.com>... > > > If you have the Image Processing Toolbox, you can consider your matrix > > > as an image and use imrotate() to rotate it around the Z axis (i.e. > > > spinning in the x-y plane). > > > > You can't do that: OP's matrix contains 3D coordinates of points, it is not an image. > > > > Bruno > > ------------------------------------------------------------------------------- > Sorry - I guess misunderstood what he wanted to do. All I saw was > that A was a 6 by 3 2D matrix and I thought that the values were the > matrix values, but it appears that they are actually (x,y,z) points > and so A really describes a cluster of points in 3D, as you point out. This is the function I was looking for. M = MAKEHGTFORM('axisrotate',[ax ay az],t)
From: John Dim on 10 May 2010 07:44 "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hs1spd$pa2$1(a)fred.mathworks.com>... > ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <7a9c02de-fbba-40f5-a470-4347509b2c1c(a)d39g2000yqa.googlegroups.com>... > > If you have the Image Processing Toolbox, you can consider your matrix > > as an image and use imrotate() to rotate it around the Z axis (i.e. > > spinning in the x-y plane). > > You can't do that: OP's matrix contains 3D coordinates of points, it is not an image. > > Bruno if I use M = MAKEHGTFORM('axisrotate',[ax ay az],t) to rotate on about an axis by t radians I get a 4x4 matrix. Thus, I am not able to multiply my Matrix by the rotation matrix M since the Inner matrix dimensions must agree. Any ideas??
From: John Dim on 10 May 2010 07:49 if I use M = MAKEHGTFORM('axisrotate',[ax ay az],t) to rotate on about an axis by t radians I get a 4x4 matrix. Thus, I am not able to multiply my Matrix by the rotation matrix M since the Inner matrix dimensions must agree. Any ideas??
From: Bruno Luong on 10 May 2010 08:13
"John Dim" <mitsoujohn(a)yahoo.com> wrote in message <hs8rrj$6n5$1(a)fred.mathworks.com>... > > > if I use M = MAKEHGTFORM('axisrotate',[ax ay az],t) to rotate on about an axis by t radians > > > > I get a 4x4 matrix. Thus, I am not able to multiply my Matrix by the rotation matrix M since > > > > the Inner matrix dimensions must agree. > > > > > Any ideas?? The fourth column corresponds to the translation. Extract the upper-left 3x3 submatrix of the matrix. Please read the help "Group Objects" if you need more details. Bruno |