Community Tip - You can change your system assigned username to something more personal in your community settings. X
When trying to create some test matrices in Mathcad 15 for the functions in the attached worksheet, I found that I couldn't create a nested array at worksheet level by setting one element of a matrix to be a matrix.
It's fine if I do it inside a program or if I manually create such an array.
Is this a known issue? Does it still exist in the latest version of Mathcad 15?
Thanks,
Stuart
Solved! Go to Solution.
Hi Stuart,
first issue seems to be fixed by creating a local variable for the input array in the program.
second is probably the indexing of the array: changed from N1[0 to N1[0,0 .
Hope this help
Andy
Hi Stuart,
first issue seems to be fixed by creating a local variable for the input array in the program.
second is probably the indexing of the array: changed from N1[0 to N1[0,0 .
Hope this help
Andy
Doh! Blindingly obvious when somebody points it out!
Thanks, Andy.
However,
Stuart
Hi Stuart.
If single indexing is not fully implemented, like in matlab, any numerical answer with it different of an error message must to be interpreted as bug.
Best regards.
Alvaro.
Yes, that one's quite invidious, Alvaro. The first assignment fails in the symbolic processor, so the second definition is, in effect, a new vector definition.
Stuart
Hi Stuart.
Ok, it isn't a matlab single index, but for columns works this single assignments. Symetry broken.
Best regards.
Alvaro.
I think that might be a slightly different kettle of fish, Alavaro.
Stuart
Oh, you're right, Stuart. Then, ¿this is a bug in the scalar expansion, and it's not related with one dimensional access to matrix elements? This is the 'symmetric' of the example with y's, previously analyzed by you.
Best regards.
Alvaro
AlvaroDíaz wrote:
Oh, you're right, Stuart. Then, ¿this is a bug in the scalar expansion, and it's not related with one dimensional access to matrix elements? This is the 'symmetric' of the example with y's, previously analyzed by you.
I think it's separate, but I don't think it's a bug so much as an interpretation of what Mathcad should return from a program when the last expression is an assignment to an element or column of an array.
Mathcad 11's behaviour was to return the value of the expression.
Mathcad 12's behaviour was to return the entire array.
The latter caused a lot of problems for people, so M13 had a Compatibility option to allow the user to choose which one they wanted. My default, which appears to be the M15 default, is to use M11's Local Assignment Result (ie, return the value). However, if you select the M12 option, you get:
Stuart
Hi.
I'm not be able to associate that what you says, not in this and nor at any other live.
Obviously, you're the matrix expert.
Best regards.
Alvaro.
AlvaroDíaz wrote:
Obviously, you're the matrix expert.
Who me? The man who can't even index a 2D matrix properly?
Stuart