Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
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
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.
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.
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.
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:
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
The attached shows how to get what you want (or what I think you want, which might not be the same thing!).
Alan