cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

more-than-2 dimensions matrix

athurin
12-Amethyst

more-than-2 dimensions matrix

Hi,

Is it possible *somehow* in Mathcad to have more-than-2 dimension matrix ? I don't want to represent them (that would be really awkard), just to define and read the elements, do some math ... the usual.

The only thing I saw that came close was to use nested matrix, but that gets a bit messy in terms of reading. X[a,b,c looks a lot better than ((X[a)[b)[c ...

Thanks

ACCEPTED SOLUTION

Accepted Solutions
RichardJ
19-Tanzanite
(To:athurin)

We have complained about this for many years too. The very obvious indexing schemes such as you show only work on the rhs of an assignment operator, not on the lhs. It makes for some additional pain when using nested arrays!

View solution in original post

14 REPLIES 14
RichardJ
19-Tanzanite
(To:athurin)

We have been asking for multidimensional arrays for at least the last 15 years. Mathsoft never gave any indication that they listened to the numerous requests for this feature, and when PTC purchased Mathsoft they apparently purchased the deafness along with the product. So the only solution is a hack job using nested arrays.

Raiko
17-Peridot
(To:athurin)

Hi Adrien,

unfornately no! It is not possible. I hope that MC prime will some day introduce 3D matricees. Until then we'll have to cope with PTC's "messy" implementation of matrix definitions.

Raiko

athurin
12-Amethyst
(To:Raiko)

Thanks a lot. Nested matrix it will be then. *sigh*

athurin
12-Amethyst
(To:athurin)

I guess the next question is : What am I doing wrong in declaring my nested matrix ? A general declaration with all indexes varying doesn't seem to work. I assume a loop would do it, but that's a bit of a pain.

nested.png

(Assuming i,j,k,u, Vin,Vout,fsw and t are defined properly)

RichardJ
19-Tanzanite
(To:athurin)

We have complained about this for many years too. The very obvious indexing schemes such as you show only work on the rhs of an assignment operator, not on the lhs. It makes for some additional pain when using nested arrays!

athurin
12-Amethyst
(To:RichardJ)

*deep sigh*

Thank you very much Richard.

One might argue that this kind of things is pushing the software to the limits, but it really seems some times that Mathcad's limits are easily reached...

Some days, I really resent the guy who got me to buy Mathcad because he wouldn't sell me Maple without Maplesim...

RichardJ
19-Tanzanite
(To:athurin)

but it really seems some times that Mathcad's limits are easily reached...

Sometimes that is true. The really sad thing about this is that it did not have to be true. All of the things we have been asking for year after year could have been implemented if PTC had decided to put their resources into them. Instead they decided to create Prime, so instead of going forwards in capability we have gone backwards, just so that we can have (in their opinion) a better interface.

athurin
12-Amethyst
(To:RichardJ)

I don't think it is just the interface, although that's the most obvious. Sometimes, it is easier to tear a building down and build a new one with a proper architecture, rather than adding floors on the old one and just hope that everything is not going to collapse. If PTC is at least a little bit sensible (how naive of me to still think that ...), they must have taken it appart in order to have better foundations for future improvements.

Except that there is no way to know if the foundations are good enough to support a taller building, since the new one is smaller than the old one.

From what you guys say, it looks very much like we are currently under Prime 0.3 ...

RichardJ
19-Tanzanite
(To:athurin)

It's mainly the interface, but I think they wanted to make changes to the API too. When they built the new foundation it would have been the ideal time to build in the capability for multidimensional arrays. I don't think they did that though, so we are as far away from that goal as we ever were. Further, in fact.

One exapmple of 3D-matrix and its interpolation

http://twt.mpei.ac.ru/ochkov/Mathcad_12/4_04_4D_Spline.png

FDS
13-Aquamarine
13-Aquamarine
(To:ValeryOchkov)

Out of curiosity how do you create a blank line (first row) in matrix 2 and 3?

ValeryOchkov
24-Ruby IV
(To:FDS)

FDS wrote:

Out of curiosity how do you create a blank line (first row) in matrix 2 and 3?

We must have a 2x3 or 2x4 matrix and inert (copy and paste) vectors and matrix.

LucMeekes
23-Emerald III
(To:FDS)

Valery probably filled the positions with a variable named " ", using [CNTRL-SHIFT-K] [SPACE] [CNTRL-SHIFT-K]. The [CNTRL-SHIFT-K] press allows you to insert (almost) any character into a varaible.

Don't forget to assign a value to that variable " "...

First press [COLON]0 onto a blank part of the sheet, then move your cursor to the placeholder at the lhs of the assignment then press [CNTRL-SHIFT-K] [SPACE] [CNTRL-SHIFT-K] and finally move your cursor out of the assignment. The variable " " is defined, the definition looks like

:=0

Success!
Luc

FDS
13-Aquamarine
13-Aquamarine
(To:LucMeekes)

Thank you Luc, now I understand it.

Announcements

Top Tags