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
- :
- Why does this vector not compute?

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- 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
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

06-25-2015
04:50 PM

06-25-2015
04:50 PM

Starting to feel a bit moronic here.

I've included a short worksheet illustrating my problem. I'm trying to graduate from simple calculation to using vectors. As you will see, I have an equation for M for which I can calculate a value easily enough. Units work out OK too.

When I attempt to make a vector (in my world, this lambda equates to a wavelength but that's irrelevant to the problem), I get an error complaining of the units.

Not really sure if that's really the issue here; can anybody else shed some light?

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

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

06-25-2015
05:21 PM

06-25-2015
05:21 PM

You've put a multiplication between M and (lambda, 300*K), dissecting the function name from its argument list. Remove that and it should work fine.

Well not completely, the funny error message is gone, but you get a single result for an input vector.

In order to get a vector of results, you need to vectorize the definition (the right-hand-side of the definition of the function M.

To do that, select it and press [CTRL -], it will show an arrow above. And the result of the last evaluation will be a vector.

Succes!

Luc

4 REPLIES 4

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

06-25-2015
05:21 PM

06-25-2015
05:21 PM

You've put a multiplication between M and (lambda, 300*K), dissecting the function name from its argument list. Remove that and it should work fine.

Well not completely, the funny error message is gone, but you get a single result for an input vector.

In order to get a vector of results, you need to vectorize the definition (the right-hand-side of the definition of the function M.

To do that, select it and press [CTRL -], it will show an arrow above. And the result of the last evaluation will be a vector.

Succes!

Luc

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

06-25-2015
05:36 PM

06-25-2015
05:36 PM

Re: Why does this vector not compute?

In addition to the extra character between the M and the opening parenthesis, you will need to use the vectorize operator (ctl-minus) to get a result for each lambda. Otherwise Mathcad will interpret the lambda multiplication in the (power to the fifth and the exponential) as a vector dot product.

Stuart

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

06-26-2015
08:32 AM

06-26-2015
08:32 AM

Re: Why does this vector not compute?

Thanks!

Based on the recommendation of someone on this forum, I've ordered "Essential MathCAD for Engineering, Science, and Math". That should help me get better at this.

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

06-26-2015
08:34 AM

06-26-2015
08:34 AM

Re: Why does this vector not compute?

I would highly recommend using this forum and the material passed by the members. Good luck.