# [Scilab-users] a linear equation

9 messages
Open this post in threaded view
|

## [Scilab-users] a linear equation

 This post was updated on . I am trying to solve linear equations with 30 unknown variables. Since the determinant of the coefficient matrix is 0, I can tell that some row vectors are linearly dependent on other row vectors. I want to solve the problem by deleting the linearly dependent rows while simultaneously changing the variables to exogenous variables. So I want to find independent row vectors of the coefficient matrix whose number equals to the rank of the coefficient matrix. Is there any way to find out such independent row vectors? Best regards. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: a linear equation

 Hello Do you just want one of the solutions, e.g. of minimum norm, or do you want more precision on the nullspace ? S. > Le 2 déc. 2018 à 09:43, fujimoto2005 <[hidden email]> a écrit : > > I am trying to solve linear equations with 30 variables. Since the > determinant of the coefficient matrix is 0, I can tell that some row vectors > are linearly dependent on other row vectors. I want to solve the problem by > deleting the linearly dependent rows while simultaneously changing the > variables to exogenous variables. > But I can't find which row vector expresses redundant constraints.   > Is there any way to find out which row is linearly dependent? > > Best regards. > > > > -- > Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html> _______________________________________________ > users mailing list > [hidden email] > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: a linear equation

 This problem is an economic problem. The i-th row of the square constraint matrix A with m dimension expresses certain economic constraints. The elements of the constraint matrix are either 0 or 1. Suppose the rank of A is r and by changing the row number a_1, ..., a_r are linearly independent. I guess the coefficient cj (1 ≤ j ≤ r) in a_i = c1 * a_1 + ... cr * a_r for any m>=i> r is found to be 0, -1, 1 for some economic reasons. I would like to find such a_1, ..., a_r pairs. The following matrix is the constraint matrix which I am dealing with. A=zeros(27,27) A(1,10)=1 A(2,5)=1 A(3,14)=1 A(4,23)=1 A(5,9)=1 A(6,18)=1 A(7,27)=1 A(8,17)=1 A(9,1)=0,A(9,18)=1 A(10,2)=1,A(10,3)=1 A(11,4)=1,A(11,5)=1,A(11,6)=1 A(12,7)=1,A(12,8)=1,A(12,9)=1 A(13,10)=1,A(13,11)=1,A(13,12)=1 A(14,13)=1,A(14,14)=1,A(14,15)=1 A(15,19)=1,A(15,20)=1,A(15,21)=1 A(16,22)=1,A(16,23)=1,A(16,24)=1 A(17,1)=0,A(17,25)=1,A(17,26)=1,A(17,27)=1 A(18,4)=1,A(18,7)=1 A(19,2)=1,A(19,5)=1,A(19,8)=1 A(20,10)=1,A(20,13)=1,A(20,16)=1 A(21,11)=1,A(21,14)=1,A(21,17)=1 A(22,19)=1,A(22,22)=1,A(22,25)=1 A(23,1)=0,A(23,20)=1,A(23,23)=1,A(23,26)=1 A(24,4)=1,A(24,7)=1 A(25,2)=1,A(25,5)=1,A(25,8)=1 A(26,10)=1,A(26,13)=1,A(26,16)=1 A(27,20)=1,A(27,23)=1,A(27,26)=1 Best regards. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: a linear equation

 Please I want to ask a question. Please I have been trying to export a graphic from scilab to an MS word document. How do I do that? Please help. ThanksSent from Yahoo Mail on Android On Sun, Dec 2, 2018 at 5:57 PM, fujimoto2005<[hidden email]> wrote: This problem is an economic problem. The i-th row of the square constraintmatrix A with m dimension expresses certain economic constraints.The elements of the constraint matrix are either 0 or 1.Suppose the rank of A is r and by changing the row number a_1, ..., a_r arelinearly independent. I guess the coefficient cj (1 ≤ j ≤ r) in a_i = c1 * a_1 + ... cr * a_r forany m>=i> r is found to be 0, -1, 1 for some economic reasons.I would like to find such a_1, ..., a_r pairs.The following matrix is the constraint matrix which I am dealing with.A=zeros(27,27)A(1,10)=1A(2,5)=1A(3,14)=1A(4,23)=1A(5,9)=1A(6,18)=1A(7,27)=1A(8,17)=1A(9,1)=0,A(9,18)=1A(10,2)=1,A(10,3)=1A(11,4)=1,A(11,5)=1,A(11,6)=1A(12,7)=1,A(12,8)=1,A(12,9)=1A(13,10)=1,A(13,11)=1,A(13,12)=1A(14,13)=1,A(14,14)=1,A(14,15)=1A(15,19)=1,A(15,20)=1,A(15,21)=1A(16,22)=1,A(16,23)=1,A(16,24)=1A(17,1)=0,A(17,25)=1,A(17,26)=1,A(17,27)=1A(18,4)=1,A(18,7)=1A(19,2)=1,A(19,5)=1,A(19,8)=1A(20,10)=1,A(20,13)=1,A(20,16)=1A(21,11)=1,A(21,14)=1,A(21,17)=1A(22,19)=1,A(22,22)=1,A(22,25)=1A(23,1)=0,A(23,20)=1,A(23,23)=1,A(23,26)=1A(24,4)=1,A(24,7)=1A(25,2)=1,A(25,5)=1,A(25,8)=1A(26,10)=1,A(26,13)=1,A(26,16)=1A(27,20)=1,A(27,23)=1,A(27,26)=1Best regards.--Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________users mailing list[hidden email]http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: a linear equation

 In reply to this post by mottelet Hi mottelet. Thank you for the question. I'm happy if all possible solutions are available. Since the rank is known to be 22, the number of solutions is 27Conb22 = 80730 or less, but if the number is small, I think I can find "basic" constraints that is economically meaningful. If it is impossible, if even one solution is found, then it may be possible to follow a chain from the economic relationship to the basic constraints. Best regards. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: a linear equation

 In reply to this post by fujimoto2005 Is there a reason not to do SVD, and throw out the singular values that are too small? On Sun, 2018-12-02 at 09:56 -0700, fujimoto2005 wrote: > This problem is an economic problem. The i-th row of the square > constraint > matrix A with m dimension expresses certain economic constraints. > The elements of the constraint matrix are either 0 or 1. > Suppose the rank of A is r and by changing the row number a_1, ..., > a_r are > linearly independent.  > I guess the coefficient cj (1 ≤ j ≤ r) in a_i = c1 * a_1 + ... cr * > a_r for > any m>=i> r is found to be 0, -1, 1 for some economic reasons. > I would like to find such a_1, ..., a_r pairs. > > The following matrix is the constraint matrix which I am dealing > with. > > A=zeros(27,27) > > A(1,10)=1 > A(2,5)=1 > A(3,14)=1 > A(4,23)=1 > A(5,9)=1 > A(6,18)=1 > A(7,27)=1 > A(8,17)=1 > A(9,1)=0,A(9,18)=1 > A(10,2)=1,A(10,3)=1 > A(11,4)=1,A(11,5)=1,A(11,6)=1 > A(12,7)=1,A(12,8)=1,A(12,9)=1 > A(13,10)=1,A(13,11)=1,A(13,12)=1 > A(14,13)=1,A(14,14)=1,A(14,15)=1 > A(15,19)=1,A(15,20)=1,A(15,21)=1 > A(16,22)=1,A(16,23)=1,A(16,24)=1 > A(17,1)=0,A(17,25)=1,A(17,26)=1,A(17,27)=1 > A(18,4)=1,A(18,7)=1 > A(19,2)=1,A(19,5)=1,A(19,8)=1 > A(20,10)=1,A(20,13)=1,A(20,16)=1 > A(21,11)=1,A(21,14)=1,A(21,17)=1 > A(22,19)=1,A(22,22)=1,A(22,25)=1 > A(23,1)=0,A(23,20)=1,A(23,23)=1,A(23,26)=1 > A(24,4)=1,A(24,7)=1 > A(25,2)=1,A(25,5)=1,A(25,8)=1 > A(26,10)=1,A(26,13)=1,A(26,16)=1 > A(27,20)=1,A(27,23)=1,A(27,26)=1 > > Best regards. > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-> Archives-f2602246.html > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users-- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell:  503.349.8432 _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users
Open this post in threaded view
|

## Re: a linear equation

 In reply to this post by fujimoto2005 Sorry, I was werong with the constraint matrix. The right values are as follows. A=zeros(27,27) A(1,10)=1 A(1,10)=1 A(2,5)=1 A(3,14)=1 A(4,23)=1 A(5,7)=1 A(6,16)=1 A(7,25)=1 A(8,17)=1 A(9,1)=0,A(9,18)=1 A(10,2)=1,A(10,3)=1 A(11,4)=1,A(11,5)=1,A(11,6)=1 A(12,7)=1,A(12,8)=1,A(12,9)=1 A(13,10)=1,A(13,11)=1,A(13,12)=1 A(14,13)=1,A(14,14)=1,A(14,15)=1 A(15,19)=1,A(15,20)=1,A(15,21)=1 A(16,22)=1,A(16,23)=1,A(16,24)=1 A(17,1)=0,A(17,25)=1,A(17,26)=1,A(17,27)=1 A(18,4)=1,A(18,7)=1 A(19,2)=1,A(19,5)=1,A(19,8)=1 A(20,10)=1,A(20,13)=1,A(20,16)=1 A(21,11)=1,A(21,14)=1,A(21,17)=1 A(22,19)=1,A(22,22)=1,A(22,25)=1 A(23,1)=0,A(23,20)=1,A(23,23)=1,A(23,26)=1 A(24,10)=1,A(24,19)=1 A(25,2)=1,A(25,11)=1,A(25,20)=1 A(26,4)=1,A(26,13)=1,A(26,22)=1 A(27,8)=1,A(27,17)=1,A(27,26)=1 Best regards. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html_______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users