Results 1 to 2 of 2

Math Help - can't extract unknown from vectorised fomula(matlab)

  1. #1
    Newbie
    Joined
    Aug 2010
    Posts
    2

    can't extract unknown from vectorised fomula(matlab)

    Hi, this is a formula for m linear equations where I need to solve for P where P is a vector of m values. Its written here in loop form and I've vectorised it below to solve in matlab

    SIRtarget and eta are scalar values
    U is an n*1 column
    G and X are n*m matrices
    P is a row of length m

    for j=1:m
    msum=0;
    for h=1:n
    s=0;
    for t=1:m
    s=s+(P(t)*X(h,t)/G(h,t));
    end
    msum=msum+U(h)*G(h,j)*s;
    end
    A(j)=msum;can't extract unknown from vectorised fomula(matlab)-image1.jpg
    end
    SIRtarget.*A - SIRtarget.*P' + SIRtarget.*eta - P'

    Vectorised for matlab as(split onto 5 lines for readability):

    SIRtarget.*(repmat(U,1,length(G(1,:))).*G)'*(sum(r epmat(P,length(X(:,1)),1).*(X./G),2))-SIRtarget.*P'
    +SIRtarget*eta*ones(length(G(1,:)),1)
    -P'
    =0;

    Problem is I cant figure out how to extract P from the vectorised formula to pass the linear equations to linsolve(Matlab). It needs to be vectorised as P could be up to 50 or 60 values long. G and X will typically be 400 rows X 50 or 60 columns.
    Original formula attached as jpg
    Any help much appreciated
    Thanks
    Richard
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Aug 2010
    Posts
    2
    Think I'm just realising that these equations are non-linear.....Can anyone confirm that from the eqn in the jpeg? Whats the acid test to determine linearity/non-linearity?
    Thanks
    Richard
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Making a fomula for this...
    Posted in the Algebra Forum
    Replies: 0
    Last Post: November 29th 2010, 07:03 AM
  2. Replies: 1
    Last Post: June 4th 2010, 10:26 PM
  3. quadratctic fomula's
    Posted in the Algebra Forum
    Replies: 11
    Last Post: May 20th 2010, 09:44 AM
  4. Replies: 0
    Last Post: December 12th 2009, 12:42 PM
  5. Rearranging a fomula??
    Posted in the Algebra Forum
    Replies: 1
    Last Post: April 18th 2009, 02:50 AM

Search Tags


/mathhelpforum @mathhelpforum