1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Why doesn't Maple recognize matrix in list?

  1. Nov 12, 2011 #1
    1. The problem statement, all variables and given/known data

    I am basically just trying to resolve this matrix in maple by using a list because for a big system, there is no way I am entering all the numbers one by one and only to find out later my size was wrong.

    So for instance

    A := matrix([[2,3,3,0],[3,1,4,9]])

    Now for some reason, (and I already loaded the packages), once you hit enter, you cannot do anything to A

    So for instance

    Code (Text):

    >A^-1
    >1/A
    >Transpose(A)
    >Transpose(A)
    It returns my command.


    Anyone got a clue? Also does anyone know how to set the default for 1-column matrices to MATRICES and NOT vectors? Getting tired of Maple's automatic switches
     
  2. jcsd
  3. Nov 12, 2011 #2

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Install need the MTM package. Try this:

    > restart; with(MTM);
    > A := matrix([[2, 3, 3, 0], [3, 1, 4, 9]]);
    > transpose(A);
    > type(A, matrix);

    Of course A-1 doesn't work since the matrix isn't square. And don't forget commands are case sensitive. No capital T on transpose.
     
  4. Nov 12, 2011 #3

    Mark44

    Staff: Mentor

    I haven't used Maple for a very long time, but I'll take a stab at your questions, for what it's worth.

    1. I don't know why you even tried to get A-1, since A is not a square matrix.
    Even if A were a square matrix, you might have problems with A^-1. I would put parentheses around the exponent to see if that made a difference.

    2. For Transpose(A), I'm going to guess that Maple is doing the calculation, but since you didn't tell Maple where to store the result, you don't see anything. I would try B = Transpose(A).
     
  5. Nov 14, 2011 #4

    Wow, I have never even seen that one before. Looked it up on Maple Help, still don't know what it is, but it works! By the way, what does "restart" do? Because I tried it without restart and it still worked


    No it worked when I loaded (the original) package with(LinearAlgebra) or Student Linear Algebra

    I use Maple 15, they've managed to get across those problems storing factor thankfully.

    And yes, I forgot that my matrix wasn't square, but even if it were square, it didn't work.

    Here is the full code that I used originally

    Code (Text):
    >with(LinearAlgebra):
    >A := matrix([[2, 3, 3, 0], [3, 1, 4, 9]])
    >Transpose(A)
    >[color=pink]Error, (in LinearAlgebra:-Transpose) invalid input: LinearAlgebra:-Transpose expects its 1st argument, A, to be of type {Matrix, Vector, scalar} but received A[/color]
     
    Pink was the error message returned to me

    EDIT: for some reason transpose (lower case t) also works, but for a square matrix, B^-1 still doesn't work
     
  6. Nov 14, 2011 #5

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Restart re-initializes the worksheet. It is handy when you have made a bunch of changes and want Maple to start over with brand new uncorrupted variables. I always put it at the top of a worksheet so when I tell Maple to re-execute the worksheet it begins with new variables.
     
  7. Nov 14, 2011 #6

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Use inv(A) for the inverse.
     
  8. Nov 20, 2011 #7
    OKay I did this again today, but it's not working again.

    I introduced

    Code (Text):


    with(LinearAlgebra):
    with(MTM):

    And I listed out the matrix in

    T0:= matrix([[...]])


    T1:=Pivot(MultiplyRow(T0,...,..)...,...)
    EDIT; never mind, for some reason it worked with STUDENT Linear Algebra. I don't even know why they separate the two packages
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Why doesn't Maple recognize matrix in list?
  1. Linux listing (Replies: 7)

  2. Maple 17 (Replies: 3)

Loading...