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!

Linear Algebra: Matlab Question

  1. Feb 13, 2017 #1
    I am taking a linear algebra class, and it has a required lab associated with it. Here is the following problem that I must solve using Matlab

    1. The problem statement, all variables and given/known data

    Write a function using row reduction to find the inverse for any given 2x2 matrix. Name your function your initial + inv(M), the output will be the inverse matrix. Test your function with the matrices in problem 1 and check the results by multiplying the inverse to the matrix for the linear system:

    x1-2x2=3
    2x1+4x2=-5

    Solve it by using the inverse matrix you find and then use M/B. Compare the results.
    Note: You can't use rref or use inv(M) in your function, you can only use row reduction)

    2. Relevant equations
    Here are the matrices from problem 1:
    M1: [2,3;4,5]
    M2: [1,-2,0;4,-7,1;0,3,5]

    3. The attempt at a solution
    I'm new to Matlab and I don't know what the teacher is asking. If someone could clarify the instructions that would be very helpful.

    As a side note, I typed everything word for word from the handout.
    _________________________________________________________________________
    EDIT:
    I figured it out.

    % Let A= Matrix, Let IM= Identity matrix
    x=A/IM

    Ugh.... so simple.... I wish that I didn't waste so much time on this problem.

    Thank you for looking.
     
    Last edited: Feb 13, 2017
  2. jcsd
  3. Feb 14, 2017 #2

    DrClaude

    User Avatar

    Staff: Mentor

    I don't see how this solves the problem you are asked.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Linear Algebra: Matlab Question
  1. MATLAB question (Replies: 2)

  2. Matlab question (Replies: 2)

  3. Matlab question (Replies: 1)

  4. A question on MATLAB (Replies: 1)

Loading...