Results 1 to 3 of 3

Thread: ask for C Numerical Libraries about matrix of multiply and subtraction

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    5

    ask for C Numerical Libraries about matrix of multiply and subtraction

    may i ask for how to solve linear equation by using sparse matrix in IMSL C Numerical Libraries

    Mathematical formulas just like :
    A*x=B*b+C*c , solve for x=?
    (A=B=C=10*10 matrix) (x=b=c=10*1 matrix)

    how can i get the inverse of A by using sparse system
    then the solution x=A-1 *B*b+A-1 *C*c can be obtained


    thank you for your attention very much

  2. #2
    Senior Member mecej4's Avatar
    Join Date
    Dec 2009
    Posts
    127
    Quote Originally Posted by kll94530136 View Post
    may i ask for how to solve linear equation by using sparse matrix in IMSL C Numerical Libraries

    Mathematical formulas just like :
    A*x=B*b+C*c , solve for x=?
    (A=B=C=10*10 matrix) (x=b=c=10*1 matrix)
    B*b + C*c is also a vector, and can be computed as such before solving the simultaneous equations. Let us call the result q. Then, the equation set to solve is A*x = q.
    how can i get the inverse of A by using sparse system
    then the solution x=A-1 *B*b+A-1 *C*c can be obtained
    Many mathematical expressions that look reasonable, such as your result for x, fall into the category of "bad idea" in a numerical computation. One such is computing the inverse of a matrix as a stepping-stone to the solution of simultaneous equations. Sparse solvers will let you obtain the solution of A x = q without having to compute the inverse.

    Which solver should you use? That depends on whether A is banded or not. Besides that, if A is only 10 X 10 there is not enough inducement to exploit sparsity.

  3. #3
    Junior Member
    Join Date
    Feb 2011
    Posts
    5
    Quote Originally Posted by mecej4 View Post
    B*b + C*c is also a vector, and can be computed as such before solving the simultaneous equations. Let us call the result q. Then, the equation set to solve is A*x = q.

    thanks
    i got it



    Many mathematical expressions that look reasonable, such as your result for x, fall into the category of "bad idea" in a numerical computation. One such is computing the inverse of a matrix as a stepping-stone to the solution of simultaneous equations. Sparse solvers will let you obtain the solution of A x = q without having to compute the inverse.

    Then i want to ask for a more question
    is that sparse matrix can only solve for
    square matrix??
    if i want B*b (B=50*49 matrix , b=49*1 matrix )

    imsl_f_mat_mul_rect_coordinate can realize it?
    if it can , can you teach me how to do
    thank you very much



    Which solver should you use? That depends on whether A is banded or not. Besides that, for a if A is only 10 X 10 there is not enough inducement to exploit sparsity.
    My matrix is very huge,just like

    A*x=B*b+C*c
    [2110*2110][2110*1]=[2110*1000][1000*1]+[2110*2110][2110*1]

    and the matrix form is not banded
    so it can be solved for only sparse in appropriately



    oh ,there is an another question about output
    if i want to let the answers be stored in a .txt format
    how can i do it?
    the User Guide is written in
    imsl_output_file
    but i don't understand very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •