+ Reply to Thread
Results 1 to 2 of 2

Thread: Math Help

  1. #1
    shermaine Newbie
    Join Date
    Jul 2003
    Posts
    548

    Default Math Help

    Given:

    X = [ 1 1
    1 1.5
    1 3
    1 3.5
    1 4]

    d = [ 3.5
    2.5
    2
    1
    1]

    how do i get w = [X^T (X)]^-1 (X^T) d

    The ans is [ 4.04
    - 0.78]

    I tried, but i cant the answer.
    Can anyone advise me
    Thanks.


  2. #2
    MrAl Excellent MrAl Excellent MrAl Excellent MrAl Excellent MrAl Excellent MrAl Excellent MrAl Excellent MrAl Excellent
    Join Date
    Sep 2008
    Location
    NJ
    Posts
    1,293

    Default

    Hi,

    You must know a few things in order to solve this:

    1. How to multiply matrixes and vectors.
    2. How to compute the transpose of a matrix.
    3. How to find the inverse of a matrix.


    If you do not know how to do any of the above let us know.

    If you do, then you proceed as follows:

    1. Calculate the transpose of X, call this T.
    2. Calculate T*X in that order using vector/matrix multiplication, call the result Y.
    3. Find the inverse of Y (which is Y^-1), call that I.
    4. Multiply I*T, call that S.
    5. Finally, multiply S*d and that result is the answer which is approximately:
    [4.037313433,
    -0.783582090]

    Remember that when you do matrix multiplication you have to observe the correct order as you
    can not reverse the order like you can do with regular single number arithmetic multiplication like
    2*3=6.
    Last edited by MrAl; 14th June 2009 at 04:00 PM.

+ Reply to Thread

Similar Threads

  1. PIC math help
    By electronicsfreak in forum Micro Controllers
    Replies: 20
    Latest: 8th June 2009, 04:17 PM
  2. i think it's math!
    By t.man in forum Math and Physics
    Replies: 0
    Latest: 17th October 2008, 12:05 PM
  3. Math Help
    By Burnt in forum Math and Physics
    Replies: 4
    Latest: 16th October 2008, 09:23 PM
  4. Math help?
    By Mike, K8LH in forum Micro Controllers
    Replies: 10
    Latest: 9th April 2007, 10:07 PM
  5. math help
    By shermaine in forum Math and Physics
    Replies: 12
    Latest: 27th November 2006, 10:40 AM

Tags for this Thread