Prev: Why does this line of code take so long to execute?
Next: Remember the Consolidator by John D'Errico?
From: us on 19 Jul 2010 08:38 "Loren_Shure" <loren.shure(a)mathworks.com> wrote in message <i21g0k$ker$1(a)fred.mathworks.com>... > > "Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in > message news:i1vm13$ok8$1(a)fred.mathworks.com... > > "Bard R." <this.is.not.a.real.address(a)gmail.com> wrote in message > > <i1vhmb$1rq$1(a)fred.mathworks.com>... > >> This is exactly what I was looking for. And so much more compact than the > >> solution I had put together during the day. It works if A and B are > >> opposite (I had to do an extra check for that as well) and for my > >> application N is by definition never parallell to neither A nor B. > >> Thanx a lot! > >> B책rd > > - - - - - - - - - - - - > > Well, if A and B, or even their projections, are in opposite directions, > > the outcome can suddenly flip from one extreme to the other depending on > > rounding. A roundoff one way gets +pi as a result and in the other > > direction flips the answer over to -pi. I don't see any good way out of > > that problem. It is more or less inherent in the nature of numerical > > computation of angles. A digital computer cannot even compute the exact > > value of pi itself. > > > > Roger Stafford > > Have you checked out the function subspace: > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/subspace.html ? > > > -- > Loren > http://blogs.mathworks.com/loren/ > http://matlabwiki.mathworks.com/MATLAB_FAQ dearest loren if you carefully wade through this thread you'll find out that it has been discussed at length, already... :-) urs
From: Roger Stafford on 19 Jul 2010 13:19 "Loren_Shure" <loren.shure(a)mathworks.com> wrote in message <i21g0k$ker$1(a)fred.mathworks.com>... > Have you checked out the function subspace: > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/subspace.html ? > -- > Loren > http://blogs.mathworks.com/loren/ > http://matlabwiki.mathworks.com/MATLAB_FAQ - - - - - - - - - Yes, Loren, as Urs has said, that was discussed in article #46 of this overly-long thread. The person proposing to use subspace was seeking an angle that ranges from 0 to pi (180 deg) as in the inner angle in triangles, but subspace would not give an angle beyond pi/2 in this case. For example a = subspace([1;0],[-1;1]) ---> 1/4*pi whereas a = acos([1;0],[-1;1]) --> 3/4*pi This reminds me. As I pointed out in that #46 article, Mathworks' documents are still in error in claiming about subspace "If A and B are column vectors of unit length, this is the same as acos(A'*B)." This error was present in my manual for system 4a back in 1994 and it still persists to this day in their most recent documentation. It should read acos(abs(A'*B)). Have you any influence with the documentation department to get them to finally make a correction on this misleading statement? Roger Stafford
From: Loren Shure on 20 Jul 2010 07:54 "Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message news:i221e8$3du$1(a)fred.mathworks.com... > "Loren_Shure" <loren.shure(a)mathworks.com> wrote in message > <i21g0k$ker$1(a)fred.mathworks.com>... >> Have you checked out the function subspace: >> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/subspace.html ? >> -- >> Loren >> http://blogs.mathworks.com/loren/ >> http://matlabwiki.mathworks.com/MATLAB_FAQ > - - - - - - - - - > Yes, Loren, as Urs has said, that was discussed in article #46 of this > overly-long thread. The person proposing to use subspace was seeking an > angle that ranges from 0 to pi (180 deg) as in the inner angle in > triangles, but subspace would not give an angle beyond pi/2 in this case. > For example > > a = subspace([1;0],[-1;1]) ---> 1/4*pi > > whereas > > a = acos([1;0],[-1;1]) --> 3/4*pi > > This reminds me. As I pointed out in that #46 article, Mathworks' > documents are still in error in claiming about subspace "If A and B are > column vectors of unit length, this is the same as acos(A'*B)." This > error was present in my manual for system 4a back in 1994 and it still > persists to this day in their most recent documentation. It should read > acos(abs(A'*B)). Have you any influence with the documentation department > to get them to finally make a correction on this misleading statement? > > Roger Stafford > Roger- Will enter a request to update the doc... -- Loren http://blogs.mathworks.com/loren/ http://matlabwiki.mathworks.com/MATLAB_FAQ
First
|
Prev
|
Pages: 1 2 3 4 5 Prev: Why does this line of code take so long to execute? Next: Remember the Consolidator by John D'Errico? |