Prev: www.jerseysuppliers.com Wholesale Cheap NFL Jerseys,NHL Jerseys,MLB Jerseys
Next: Matlab program to solve wave equation up to linear system of equations
From: Els on 21 May 2010 03:27 I have possibly a very simple question. I have a vector a(x,y,z)(between P and P1), and a vector b(x1,y1,z1)(between P1 and P2). How do I check in Matlab that the two vectors are in line with each other? So that the angle between the vectors is zero.
From: Yi Cao on 21 May 2010 03:45 "Els " <y.e.t.reeuwijk(a)student.utwente.nl> wrote in message <ht5ck9$4up$1(a)fred.mathworks.com>... > I have possibly a very simple question. > > I have a vector a(x,y,z)(between P and P1), and a vector b(x1,y1,z1)(between P1 and P2). > > How do I check in Matlab that the two vectors are in line with each other? So that the angle between the vectors is zero. You can check the difference between a'*b and norm(a)*norm(b), whether it is zero. HTH Yi
From: Els on 21 May 2010 04:41 a and b are both row vectors, so A=a'*b B=norm(a)*norm(b) gives me a problem, because A is a 3x3 matrix. Is it correct to say that A=a*b'? And that the difference G = round(abs(A-B))?
From: Hiram K. Hackenbacker on 21 May 2010 08:38 "Els " <y.e.t.reeuwijk(a)student.utwente.nl> wrote in news:ht5ck9$4up$1(a)fred.mathworks.com: > I have possibly a very simple question. > > I have a vector a(x,y,z)(between P and P1), and a vector > b(x1,y1,z1)(between P1 and P2). > > How do I check in Matlab that the two vectors are in line with each > other? So that the angle between the vectors is zero. Check the vector cross product = [0 0 0] C = cross(A,B); A, B Vectors
From: Yi Cao on 21 May 2010 09:20
"Els " <y.e.t.reeuwijk(a)student.utwente.nl> wrote in message <ht5gvb$l08$1(a)fred.mathworks.com>... > a and b are both row vectors, so > > A=a'*b > B=norm(a)*norm(b) > > gives me a problem, because A is a 3x3 matrix. > Is it correct to say that A=a*b'? > > And that the difference G = round(abs(A-B))? That is right. Yi |