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
- :
- Problem with matrix

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

Highlighted
##

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

11-20-2012
07:16 PM

11-20-2012
07:16 PM

Problem with matrix

Hi,

I'm new with mathcad and i'm working with a simple camshaft kinematic and dinamic analysis and i'm having problems evaluating some matrix in the dinamic part.

Attatched is the file, it's in spanish and the problems appear after the "análsis dinámico" part. The problems that appear are "undefined variables" in the matrix where i define the variables i want to solve, units incongruence in some matrix, etc.

Hope you can help me.

Thanks,

Jorge

Labels:

7 REPLIES 7

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

11-21-2012
03:34 AM

11-21-2012
03:34 AM

Re: Problem with matrix

It seems you ran into two matrix limitations of Mathcad:

1) all Elements of a matrix must have the same unit

2) functions are not allowed as matrix elements

Both are on the wishlist of us costumers for quite some time (along with multi dimensional arrays) but obviously not on the todo-list of PTC.

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

11-21-2012
08:09 AM

11-21-2012
08:09 AM

Re: Problem with matrix

Functions are allowed as matrix elements. Even function names are allowed as matrix elements, although then there are some restrictions (it is not just that different units are not alowed in arrays, but in fact different types are not allowed, so mixing function names with other elements may not be possible).

Prime allows mixed units in arrays. So this is one of our wishes that has, finally, been fulfilled.

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

11-21-2012
08:15 AM

11-21-2012
08:15 AM

Re: Problem with matrix

You have several problems.

As already noted, mixed units are not allowed in arrays. a2*sin(theta2), for example, evaluates to a length. The number 1, obviously, doesn't. If that is supposed to be 1m, make it 1m.

More importantly, the variables in the vector on the rhs, R02x, R02y, etc are undefined.

Even if you fix those problems you cannot define functions F2x, F2y, etc like that.You need a single name on the lhs, with the argument, for example (Results(theta2)). A vector of functions on the lhs wil not work (I assume this is what WE meant). You an create separate functions after that, for example F2x(theta2):=Results(theta2)[0

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

11-21-2012
08:54 AM

11-21-2012
08:54 AM

Re: Problem with matrix

The attached shows how to get what you want (or what I think you want, which might not be the same thing!).

Alan

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

11-21-2012
04:15 PM

11-21-2012
04:15 PM

Re: Problem with matrix

Richard Jackson schrieb:

Functions are allowed as matrix elements.

Yes, my fault. Thank for pointing out. What I was thinking of was that you cannot define a vector (or matrix) of functions intuitively (and/or through a program) like

but have to do it "manually"

and of course concerning the worksheet under discussion that, while you can define variables with

you cannot do it likewise with functions

You could do it using the symbolical evaluation, but nevertheless you would have to redifine the functions

But it seems that Alan has presented a solution to the poster's problem anyway.

Even function names are allowed as matrix elements,

??

Prime allows mixed units in arrays. So this is one of our wishes that has, finally, been fulfilled.

Glad to hear that. Haven't done much with Prime yet because so much is not implemented yet, it reacts awfully slow and I have great difficulties to see e.g. a marked area on my lcd and even worse on the notebook screen. So we wait 'til Prime gets grown up.

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

11-21-2012
05:34 PM

11-21-2012
05:34 PM

Re: Problem with matrix

What I was thinking of was that you cannot define a vector (or matrix) of functions intuitively (and/or through a program)

I did wonder if that's what you meant (see my reply to Jorge). I agree. This is an annoying restriction.

Even function names are allowed as matrix elements,

??

Using your example, the arguments to the functions are not necessary:

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

11-21-2012
06:26 PM

Top Tags