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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Arrays

TomGutman
1-Newbie

Arrays

I was rather disappointed upon looking through to basics of MC' to find that the same inadequate array handling (fixed two dimensions, no proper distinction between matrices and vectors, no higher order arrays) as found in Mathcad. After all the discussions and the consensus, including Mathsoft, as to the need for something better it is rather disappointing to find that MC' is not a new start but mainly a stripped down MC.

I would like to suggest to at least fix the row and column select. The current implementation results in a rather weird notation, one that does not resemble anything I've seen, and is very non-extensible to higher dimensions. I suggest simplifying them by using the same optional place holders that have been so effectively used for roots and derivatives. Given an array, you select a row by providing a row index, and a column by providing a column index. Providing both selects both a row and a column (i.e., an element of the matrix). Specifying neither results in a reference to the entire matrix. At least this results in sensible notation, and extends naturally to cross sections of any dimensionality.
__________________
� � � � Tom Gutman
6 REPLIES 6
RichardJ
19-Tanzanite
(To:TomGutman)

On 8/24/2009 3:37:31 AM, Tom_Gutman wrote:

>I would like to suggest to at
>least fix the row and column
>select. The current
>implementation results in a
>rather weird notation, one
>that does not resemble
>anything I've seen, and is
>very non-extensible to higher
>dimensions. I suggest
>simplifying them by using the
>same optional place holders
>that have been so effectively
>used for roots and
>derivatives. Given an array,
>you select a row by providing
>a row index, and a column by
>providing a column index.
>Providing both selects both a
>row and a column (i.e., an
>element of the matrix).
>Specifying neither results in
>a reference to the entire
>matrix. At least this results
>in sensible notation, and
>extends naturally to cross
>sections of any
>dimensionality.

I agree. Now that there are many other places where empty placeholders are allowed, there is no reason not to implement it for array indexing.

And while they are at it, they can make the column operator the column operator again, rather than the row operator. As it stands now, if you see some math printed from Mathcad (e.g. in a pdf) you can't know hat is being done unless you know which version of Mathcad was used to generate it. That is highly undesirable.

Richard
SteenGroðe
6-Contributor
(To:RichardJ)

Sounds simple but doesn't there have to be some indication that one wants all?

M[all,3 or somthing like that.

Steen Gro�e
RichardJ
19-Tanzanite
(To:SteenGroðe)

I'm not sure what you mean by all.

We discussed this in an old thread, but it would also be easy to extend the syntax to allow it to get a submatrix. Just put a range in the appropriate index placeholder(s).

Richard
PhilipOakley
5-Regular Member
(To:RichardJ)

One problem is trying to auto generate a range that
implicitly exactly matches the array (Matlab uses
the : character and such things as 1:end)

e.g. to get say a 2d slice from a 3d array
(:,3,12:2:end)
to try and get slice 3 in the 2nd dimension, with a
sub-indexed third dimension from the even indices
starting at 12. Those are practical things one would
like to be able to achieve.

They do need to implement n-dim arrays first though
😉

Philip Oakley

Omission of an index in a particular position implies all values for that index. Hence a row is selected with the syntax Mi, (the empty placeholder not being displayed unless in edit mode), a column is selected with the syntax M,j. Logically the form M, is the entire matrix (for which the entire subscript part could have been omitted) and Mi,j selects the ith row and jth column (i.e., a single element).
__________________
� � � � Tom Gutman

I think Tom has a very good idea here -- there is a certain simplicity that makes it more elegant (no clunky notation). To compare it to something I came across in photography: it reminds me of how the Rollei 6006 camera can be very easily/intuitively switched between manual�aperture priority � shutter priority � program exposure mode by either explicitly setting the value for the control (shutter speed or aperture) or setting the control to A (automatic) mode. The absence of an index value is like the A mode that says "give me the whole applicable range unless I tell you what I want."

Greg S.
Top Tags