Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Simple Vector Question

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-20-2013
05:47 PM

12-20-2013
05:47 PM

Simple Vector Question

Hi, All --

I have what I fear is a too-simple question. For some reason, I am having a real mental block figuring it out, though. Say I have some vector in **R3** (*x*, *y*, *z*). I would like to find a vector orthogonal to this one. The obvious solution is (1/*x*, 1/*y*, -2/*z*). However, this blows up if one or more of the components of the original vector is zero (i.e., if the vector lies in a plane defined by the global coordinate system).

We have a way to handle this is an *ad hoc* fashion (*if* statements), but it seems to me that there should be some slick linear algebra that we could emply to solve this problem in a more elegant way, but it currently escapes me.

Thoughts?

Thanks in advance.

Matt

Labels:

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-20-2013
08:26 PM

12-20-2013
08:26 PM

Re: Simple Vector Question

Not sure but I think you will run into some kind of singularity or error with any simple formula.

See attached two very different ways to get a normalvector - both have its drawbacks.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

12-20-2013
09:13 PM

12-20-2013
09:13 PM

Re: Simple Vector Question

Thanks a bunch -- I like that "shorter" idea, Werner -- it allows us to trap only one potential error (i.e., x=y=z) rather than several. It's not perfect, but much faster than our alternative. We're actually just testing some calculations in Mathcad but then implementing them in a scripting language in a different piece of software. SInce we will need to perform this calculations many millions of times, speed is of the essence.

Top Tags