Skip to main content
1-Visitor
March 1, 2014
Solved

Arrays

  • March 1, 2014
  • 2 replies
  • 17233 views

Hello to everyone...

I am trying to learn how mathcad uses arrays. I am looking at mathcad v.15's quicksheet example.

Here is an excerpt that I don't understand at all.

I am trying to create something similar myself......something simple, such as a variable with two colums and one row, but I am unable to reproduce that following the example mathcad provides. I have looked over all the help and quicksheets, but mathcad gleans over too much and doesn't come right out and specify how it is creating this kind of array --- with the braces "{a,b}" elements in the above "M" array....or matrix.

Can someone shed some light on this please? I am stuck and out of ideas on my own.

Thank you!

Best answer by Werner_E

NO!

You see both ways to display in the last two lines of the screenshot.

1) "Expanded" NOT checked - you see just the braces telling you its a matrix and its dimensions

2) "Expanded" checked: The braces are expanded any you see the real matrices inside M

2 replies

25-Diamond I
March 1, 2014

Something went wrong with the pic you tried to insert.

Please attach your worksheet.

fizzy1-VisitorAuthor
1-Visitor
March 1, 2014

Hi Werner...

Thanks for letting me know.

I was not aware it did not show in my original post.....<sigh>

Since I don't see any concievable way to 'attach' a file here......I resorted to taking a screen-shot. It seems the only way to do it ----- [?]

program.jpg

25-Diamond I
March 1, 2014

To attach files you have to chose "Use advanced editor" at the upper right, then you are given the opportunity to attach files at the end of the post. Alternatively you can post, "Add Reply" and then immediatly chose edit - thos brings you in advanced editor, too.

The braces you see in the evaluation of M are just an indicator of nested arrays. {2,2} means that this is a 2x2 matrix, but thats explained in text next to the expression anyway. You can try to double click the result (or chose Format Result from the menu) and then in tab "Display Options" check "Expand nested arrays".

1-Visitor
September 7, 2016

Bit stymied here,

just want to reach individual elements in the nested matrices...

i.e matrix is [200,200,25], and I can reach the 1x25 vector with the usual M[i,j] 2D addressing convention

Would be very simple with 3d array addressing... e.g. M[i,j,k], but Prime's convention, though clumsy, should work

the manual's suggested short cut keystroke doesn't seem to work (ie tried these: "Control" + "5";  "Control" + "shift" +"5"), Prime 3.1 ignores the typed shortcut in all the syntax permutations I've tried. Anyone find a clear example of the proper syntax?

1-Visitor
September 7, 2016

RICHARD GRAUSLYS wrote:

Bit stymied here,

just want to reach individual elements in the nested matrices...

i.e matrix is [200,200,25], and I can reach the 1x25 vector with the usual M[i,j] 2D addressing convention

Would be very simple with 3d array addressing... e.g. M[i,j,k], but Prime's convention, though clumsy, should work

the manual's suggested short cut keystroke doesn't seem to work (ie tried these: "Control" + "5";  "Control" + "shift" +"5"), Prime 3.1 ignores the typed shortcut in all the syntax permutations I've tried. Anyone find a clear example of the proper syntax?

Select the M[i,j] then index that as you would normally do.

Here's how to do it in Mathcad 15 (I haven't got Prime).

Stuart

1-Visitor
September 7, 2016

Thought it would work the way you show, not sure why Prime 3.1 won't allow it (my keystroke syntax must be messed up).