user3540983
user3540983

Reputation: 141

Maple equivalent to Matlab matrix(1:N)?

What is the Maple equivalent to Matlab matrix(1:N) so how can I reach matrix elements in Maple?

Upvotes: 1

Views: 63

Answers (1)

acer
acer

Reputation: 7271

M := LinearAlgebra:-RandomMatrix(4);

                         [-93    -32     8     44]
                         [                       ]
                         [-76    -74    69     92]
                    M := [                       ]
                         [-72     -4    99    -31]
                         [                       ]
                         [ -2     27    29     67]


M[2..4,1..2];

                             [-76    -74]
                             [          ]
                             [-72     -4]
                             [          ]
                             [ -2     27]


M[2..3,..];

                       [-76    -74    69     92]
                       [                       ]
                       [-72     -4    99    -31]


M[..,2..4];

                          [-32     8     44]
                          [                ]
                          [-74    69     92]
                          [                ]
                          [ -4    99    -31]
                          [                ]
                          [ 27    29     67]

See the help topic rtable_indexing for more.

Upvotes: 2

Related Questions