From fujimoto2005 at gmail.com Sun Dec 2 09:43:32 2018 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 2 Dec 2018 01:43:32 -0700 (MST) Subject: [Scilab-users] a linear equation Message-ID: <1543740212155-0.post@n3.nabble.com> 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: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From stephane.mottelet at utc.fr Sun Dec 2 17:20:44 2018 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sun, 2 Dec 2018 17:20:44 +0100 Subject: [Scilab-users] a linear equation In-Reply-To: <1543740212155-0.post@n3.nabble.com> References: <1543740212155-0.post@n3.nabble.com> Message-ID: <252F783C-C5B2-400E-A039-D9BA034F1B52@utc.fr> 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 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 > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users From fujimoto2005 at gmail.com Sun Dec 2 17:56:33 2018 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 2 Dec 2018 09:56:33 -0700 (MST) Subject: [Scilab-users] a linear equation In-Reply-To: <252F783C-C5B2-400E-A039-D9BA034F1B52@utc.fr> References: <1543740212155-0.post@n3.nabble.com> <252F783C-C5B2-400E-A039-D9BA034F1B52@utc.fr> Message-ID: <1543769793613-0.post@n3.nabble.com> 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 From charlywonders at yahoo.com Sun Dec 2 22:11:15 2018 From: charlywonders at yahoo.com (charle iwuji) Date: Sun, 2 Dec 2018 21:11:15 +0000 (UTC) Subject: [Scilab-users] a linear equation In-Reply-To: <1543769793613-0.post@n3.nabble.com> References: <1543740212155-0.post@n3.nabble.com> <252F783C-C5B2-400E-A039-D9BA034F1B52@utc.fr> <1543769793613-0.post@n3.nabble.com> Message-ID: <315593496.517585.1543785075857@mail.yahoo.com> 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. Thanks Sent from Yahoo Mail on Android On Sun, Dec 2, 2018 at 5:57 PM, 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 users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Sun Dec 2 23:35:19 2018 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 2 Dec 2018 15:35:19 -0700 (MST) Subject: [Scilab-users] a linear equation In-Reply-To: <252F783C-C5B2-400E-A039-D9BA034F1B52@utc.fr> References: <1543740212155-0.post@n3.nabble.com> <252F783C-C5B2-400E-A039-D9BA034F1B52@utc.fr> Message-ID: <1543790119643-0.post@n3.nabble.com> 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 From tim at wescottdesign.com Sun Dec 2 23:59:05 2018 From: tim at wescottdesign.com (Tim Wescott) Date: Sun, 02 Dec 2018 14:59:05 -0800 Subject: [Scilab-users] a linear equation In-Reply-To: <1543769793613-0.post@n3.nabble.com> References: <1543740212155-0.post@n3.nabble.com> <252F783C-C5B2-400E-A039-D9BA034F1B52@utc.fr> <1543769793613-0.post@n3.nabble.com> Message-ID: <1543791545.4094.1.camel@wescottdesign.com> 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 > users at lists.scilab.org > 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 From fujimoto2005 at gmail.com Mon Dec 3 00:18:58 2018 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 2 Dec 2018 16:18:58 -0700 (MST) Subject: [Scilab-users] a linear equation In-Reply-To: <1543740212155-0.post@n3.nabble.com> References: <1543740212155-0.post@n3.nabble.com> Message-ID: <1543792738467-0.post@n3.nabble.com> 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 From fujimoto2005 at gmail.com Mon Dec 3 02:57:54 2018 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 2 Dec 2018 18:57:54 -0700 (MST) Subject: [Scilab-users] a linear equation In-Reply-To: <1543791545.4094.1.camel@wescottdesign.com> References: <1543740212155-0.post@n3.nabble.com> <252F783C-C5B2-400E-A039-D9BA034F1B52@utc.fr> <1543769793613-0.post@n3.nabble.com> <1543791545.4094.1.camel@wescottdesign.com> Message-ID: <1543802274724-0.post@n3.nabble.com> Dear Wescot I know how to approximate A with SVD, but I do not know how to find independent row vectors of A. How can I do? Best regards. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From fujimoto2005 at gmail.com Mon Dec 3 06:56:53 2018 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Sun, 2 Dec 2018 22:56:53 -0700 (MST) Subject: [Scilab-users] a linear equation In-Reply-To: <1543802274724-0.post@n3.nabble.com> References: <1543740212155-0.post@n3.nabble.com> <252F783C-C5B2-400E-A039-D9BA034F1B52@utc.fr> <1543769793613-0.post@n3.nabble.com> <1543791545.4094.1.camel@wescottdesign.com> <1543802274724-0.post@n3.nabble.com> Message-ID: <1543816613626-0.post@n3.nabble.com> Dear all I found a solution. I get the column echelon form of A by X=rref(A')'. Then the rows' numbers with the non-zero pivot of X are the independent rows' numbers of A. In this problem 26th row and 27th row are redundant. 26th rows are represented by linear combinations of 24th row and 1st-23rd rows. 27th rows are represented by a linear combination of 25th row and 1st-23rd rows. Best regards. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From j.s.strom at hslmg.de Wed Dec 5 13:01:26 2018 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Wed, 05 Dec 2018 13:01:26 +0100 Subject: [Scilab-users] Inserting %nan at given positions into a vector Message-ID: <5C07BE16.5080504@hslmg.de> Hallo Scilab experts, Given is a numeric vector x of length n and an index vector i with max(i)=n. I want to insert a %nan after every x(i). Example x=[11:20] i=[2 5 8] Required result: y=[11 12 %nan 13 14 15 %nan 16 17 18 %nan 19 20] How would you proceed so that it works fast for n>500000 too. Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Wed Dec 5 17:47:51 2018 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Wed, 05 Dec 2018 17:47:51 +0100 Subject: [Scilab-users] Wanted: Command like regexp accepting a string vector for haystack Message-ID: <5C080137.1070401@hslmg.de> Hallo Scilab experts, I am looking for a command to *return the match (or position) of a character string (=needle) in a **vector**of strings (=haystack), where needle may be a regular expression* Needle occurs only once in any line of haystack. That may ease the problem. [start, final, match] =regexp(input, pattern, 'r') is very close to it but does not accept a vector of strings as a haystack. I hope to have overlooked something in my search. Is there such a command? Vectorisation is essential here because otherwise the search is too slow for many lines (<10^6). Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Dec 5 21:50:53 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 5 Dec 2018 21:50:53 +0100 Subject: [Scilab-users] Wanted: Command like regexp accepting a string vector for haystack In-Reply-To: <5C080137.1070401@hslmg.de> References: <5C080137.1070401@hslmg.de> Message-ID: <8efb7b87-9f74-26e4-4a6c-233d5ae422d7@free.fr> Hello Jens, Le 05/12/2018 ? 17:47, Jens Simon Strom a ?crit : > > Hallo Scilab experts, > I am looking for a command to > > *return the match (or position) of a character string (=needle) in a > **vector**of strings (=haystack), where needle may be a regular > expression* > > Needle occurs only once in any line of haystack. That may ease the > problem. > > [start, final, match] = regexp(input, pattern, 'r') is very close to > it but does not accept a vector of strings as a haystack. I hope to > have overlooked something in my search. Is there such a command? > Vectorisation is essential here because otherwise the search is too > slow for many lines (<10^6). You may concatenate your input array with some gluing character that you know is not in the strings (for instance, likely, ascii(10)), and then use regexp() on the single glued result. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Dec 5 22:12:47 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 5 Dec 2018 22:12:47 +0100 Subject: [Scilab-users] Inserting %nan at given positions into a vector In-Reply-To: <5C07BE16.5080504@hslmg.de> References: <5C07BE16.5080504@hslmg.de> Message-ID: <1c935a5b-b051-2154-ddd1-2d0fcbdaf550@free.fr> Le 05/12/2018 ? 13:01, Jens Simon Strom a ?crit : > Hallo Scilab experts, > Given is a numeric vector x of length n and an index vector i with > max(i)=n. I want to insert a %nan after every x(i). > > Example > x=[11:20] > i=[2 5 8] > Required result: y=[11 12 %nan 13 14 15 %nan 16 17 18 %nan 19 20] > > How would you proceed so that it works fast for n>500000 too. The following code does it: x = 11:20; i = [2 5 8]; // [11 12 13 14 15 16 17 18 19 20] //Required result: y=[11 12 %nan 13 14 15 %nan 16 17 18 %nan 19 20] nx = size(x,"*"); ni = size(i,"*"); o = ones(1,nx); o(i+1) = 2; newx = zeros(1,nx+ni); newx(cumsum(o)) = x; newx(i+(1:ni)) = %nan --> newx(i+(1:ni)) = %nan newx = 11. 12. Nan 13. 14. 15. Nan 16. 17. 18. Nan 19. 20. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Thu Dec 6 14:51:40 2018 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 06 Dec 2018 14:51:40 +0100 Subject: [Scilab-users] Wanted: Command like regexp accepting a string vector for haystack In-Reply-To: <8efb7b87-9f74-26e4-4a6c-233d5ae422d7@free.fr> References: <5C080137.1070401@hslmg.de> <8efb7b87-9f74-26e4-4a6c-233d5ae422d7@free.fr> Message-ID: <5C09296C.2030404@hslmg.de> Thanks Samuel, That works fine. Regards Jens -------------------------------------------------------------------------------------- Am 05.12.2018 21:50, schrieb Samuel Gougeon: > Hello Jens, > > Le 05/12/2018 ? 17:47, Jens Simon Strom a ?crit : >> >> Hallo Scilab experts, >> I am looking for a command to >> >> *return the match (or position) of a character string (=needle) in a >> **vector**of strings (=haystack), where needle may be a regular >> expression* >> >> Needle occurs only once in any line of haystack. That may ease the >> problem. >> >> [start, final, match] =regexp(input, pattern, 'r') is very close to it but does not accept a vector of strings as a haystack. >> >> I hope to have overlooked something in my search. Is there such a command? >> >> Vectorisation is essential here because otherwise the search is too slow for many lines (<10^6). > > You may concatenate your input array with some gluing character that > you know is not in the strings (for instance, likely, ascii(10)), and > then use regexp() on the single glued result. > > HTH > Samuel > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Thu Dec 6 14:54:03 2018 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 06 Dec 2018 14:54:03 +0100 Subject: [Scilab-users] Inserting %nan at given positions into a vector In-Reply-To: <1c935a5b-b051-2154-ddd1-2d0fcbdaf550@free.fr> References: <5C07BE16.5080504@hslmg.de> <1c935a5b-b051-2154-ddd1-2d0fcbdaf550@free.fr> Message-ID: <5C0929FB.3030902@hslmg.de> Hallo Samuel, Tanquam ex ungue leonem! Great! Kind regards Jens ------------------------------------------------------------- Am 05.12.2018 22:12, schrieb Samuel Gougeon: > Le 05/12/2018 ? 13:01, Jens Simon Strom a ?crit : >> Hallo Scilab experts, >> Given is a numeric vector x of length n and an index vector i with >> max(i)=n. I want to insert a %nan after every x(i). >> >> Example >> x=[11:20] >> i=[2 5 8] >> Required result: y=[11 12 %nan 13 14 15 %nan 16 17 18 %nan 19 20] >> >> How would you proceed so that it works fast for n>500000 too. > > The following code does it: > > x = 11:20; > i =[2 5 8]; > // [11 12 13 14 15 16 17 18 19 20] > //Required result: y=[11 12 %nan 13 14 15 %nan 16 17 18 %nan 19 20] > nx = size(x,"*"); > ni = size(i,"*"); > o = ones(1,nx); > o(i+1) = 2; > newx = zeros(1,nx+ni); > newx(cumsum(o)) = x; > newx(i+(1:ni)) = %nan > > --> newx(i+(1:ni)) = %nan > newx = > 11. 12. Nan 13. 14. 15. Nan 16. 17. 18. Nan 19. 20. > > Regards > Samuel > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Fri Dec 7 15:49:00 2018 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Fri, 07 Dec 2018 15:49:00 +0100 Subject: [Scilab-users] Wanted: Command like regexp accepting a string vector for haystack In-Reply-To: <5C09296C.2030404@hslmg.de> References: <5C080137.1070401@hslmg.de> <8efb7b87-9f74-26e4-4a6c-233d5ae422d7@free.fr> <5C09296C.2030404@hslmg.de> Message-ID: <5C0A885C.3030900@hslmg.de> Hallo Samuel, Just further feedback! In my case, when concatenating the 7000 lines (minimum example of a gpx file) to one long string 1 x 1, grep needs three times more computing time compared to parsing the lines in a loop. Here vectorisation is way slower. Kind regards Jens ---------------------------------------------------------------------------------------- Am 06.12.2018 14:51, schrieb Jens Simon Strom: > Thanks Samuel, > > That works fine. > > Regards > Jens > -------------------------------------------------------------------------------------- > Am 05.12.2018 21:50, schrieb Samuel Gougeon: >> Hello Jens, >> >> Le 05/12/2018 ? 17:47, Jens Simon Strom a ?crit : >>> >>> Hallo Scilab experts, >>> I am looking for a command to >>> >>> *return the match (or position) of a character string (=needle) in a >>> **vector**of strings (=haystack), where needle may be a regular >>> expression* >>> >>> Needle occurs only once in any line of haystack. That may ease the >>> problem. >>> >>> [start, final, match] =regexp(input, pattern, 'r') is very close to it but does not accept a vector of strings as a haystack. >>> >>> I hope to have overlooked something in my search. Is there such a command? >>> >>> Vectorisation is essential here because otherwise the search is too slow for many lines (<10^6). >> >> You may concatenate your input array with some gluing character that >> you know is not in the strings (for instance, likely, ascii(10)), and >> then use regexp() on the single glued result. >> >> HTH >> Samuel >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Sun Dec 9 12:10:43 2018 From: arctica1963 at gmail.com (Lester Anderson) Date: Sun, 9 Dec 2018 11:10:43 +0000 Subject: [Scilab-users] Shading and illumination for 3D surfaces Message-ID: Hi all, Just a quick query, but is it possible to apply shading/illumination to 3D surfaces? Lester -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Sun Dec 9 14:03:00 2018 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sun, 9 Dec 2018 14:03:00 +0100 Subject: [Scilab-users] Shading and illumination for 3D surfaces In-Reply-To: References: Message-ID: <644A87BB-1532-42EA-9669-9CA2253274FE@utc.fr> Yes just type: ?> help light S. > Le 9 d?c. 2018 ? 12:10, Lester Anderson a ?crit : > > Hi all, > > Just a quick query, but is it possible to apply shading/illumination to 3D surfaces? > > Lester > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Sun Dec 9 14:49:28 2018 From: arctica1963 at gmail.com (Lester Anderson) Date: Sun, 9 Dec 2018 13:49:28 +0000 Subject: [Scilab-users] Shading and illumination for 3D surfaces In-Reply-To: <644A87BB-1532-42EA-9669-9CA2253274FE@utc.fr> References: <644A87BB-1532-42EA-9669-9CA2253274FE@utc.fr> Message-ID: Many thanks Stephane! On 13:03, Sun, 9 Dec 2018 St?phane Mottelet Yes just type: > > ?> help light > > S. > > Le 9 d?c. 2018 ? 12:10, Lester Anderson a ?crit : > > Hi all, > > Just a quick query, but is it possible to apply shading/illumination to 3D > surfaces? > > Lester > > _______________________________________________ > users mailing list > users at lists.scilab.org > > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Fri Dec 14 15:48:45 2018 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Fri, 14 Dec 2018 11:48:45 -0300 Subject: [Scilab-users] Possible error in manual In-Reply-To: <5C13BAD7.9010203@fceia.unr.edu.ar> References: <5C13BAD7.9010203@fceia.unr.edu.ar> Message-ID: <5C13C2CD.5000106@fceia.unr.edu.ar> Dear All, In the help information for the FFT function I find that, regarding the "inverse" FFT, fft(x,1), the formula is n x(k) = SUM(a(m)*exp(2*%i*%pi*(m-1)*(k-1)/n) m=1 But this is not the inverse FFT since it lacks the required 1/n factor; however, fft(fft(a,-1),1) indeed returns a. So the procedure seems to be mistakenly described in the help information. Interestingly, the fftw3 documentation, http://www.fftw.org/fftw3.pdf, gives, on page 42, the same formula but it indicates it is an unnormalized transform. Would you please clarify? Regards, Federico Miyara --- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Fri Dec 14 16:34:30 2018 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Fri, 14 Dec 2018 12:34:30 -0300 Subject: [Scilab-users] Possible error in manual Message-ID: <5C13CD86.7080702@fceia.unr.edu.ar> Dear All, I've converted a Matlab function to Scilab. The converter inserts yhe following code: // Output variables initialisation (not found in input variables) z=[]; z is the output variable. Is it necessary to initialise the output variables? Regards, Federico Miyara --- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Fri Dec 14 16:41:43 2018 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Fri, 14 Dec 2018 12:41:43 -0300 Subject: [Scilab-users] Output variable initialisation? Message-ID: <5C13CF37.8020201@fceia.unr.edu.ar> Dear All, I've converted a Matlab function to Scilab. The converter inserts the following code: // Output variables initialisation (not found in input variables) z=[]; z is the output variable. Is it necessary to initialise the output variables? Regards, Federico Miyara --- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From JDHeinzmann at gmail.com Fri Dec 14 19:28:11 2018 From: JDHeinzmann at gmail.com (JD Heinzmann) Date: Fri, 14 Dec 2018 11:28:11 -0700 (MST) Subject: [Scilab-users] Trying to use old Scicos file with Xcos In-Reply-To: <1393512359.2204.3.camel@paros> References: <1391382524436-4028498.post@n3.nabble.com> <1391506993.5710.5.camel@paros> <1393512359.2204.3.camel@paros> Message-ID: <1544812091493-0.post@n3.nabble.com> Sorry to have dropped this conversation 4 years ago. May I bring it alive again? I have just installed SciLab 6.0.1 and would like to be able to use the .cos file I have working in SciCosLab-4.4b8 with Xcos. But there is no option for opening it in SciLab-6. I was able to open it in SciLab-5.4.1 (but not run it as noted previously) and save it as a .zcos file which I am attaching. I am also attaching the original .cos file from 4.4b8 and the context file which should be run first to set up the variables needed for the simulation. Is it possible to convert one of these files to run with Scilab 6? FlameLicker.zcos FlameLicker.cos FL_Context.sce Thank you. -- JD -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sgougeon at free.fr Sun Dec 16 19:20:16 2018 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 16 Dec 2018 19:20:16 +0100 Subject: [Scilab-users] SCILAB2C toolbox ATOMS update In-Reply-To: References: Message-ID: <6a810203-b14f-2721-3910-5f1ae4d7bade@free.fr> Hello, Le 22/09/2017 ? 08:20, Abhinav Dronamraju a ?crit : > Dear Sir, > > We have been working on the scilab2c toolbox for some time now and we > want to update our changes in the atoms webpage of yours. What do we > need to do to get this thing done and update the functions, other > changes we have done in your atoms webpage ? You may ask to Cl?ment Clement.David at esi-group.com to be added to the list of maintainers of https://atoms.scilab.org/toolboxes/scilab2c Cl?ment will likely need to know your loggin in order to identify you. So, just check that you can loggin on the ATOMS portal, and on the Forge portal (since this module has a Scilab forge @ http://forge.scilab.org/index.php/p/scilab2c/) and send your loggin to Cl?ment. HTH Best regards Samuel GOUGEON -------------- next part -------------- An HTML attachment was scrubbed... URL: From Holger.Niedermaier at ESTW.DE Wed Dec 19 14:56:53 2018 From: Holger.Niedermaier at ESTW.DE (Niedermaier.Holger) Date: Wed, 19 Dec 2018 13:56:53 +0000 Subject: [Scilab-users] Mingw Compiler error, Xcos model compiler Error Message-ID: <9f179e9ffdd745fcaa86ff225c2a9516@ESTW.DE> Dear all, it's maybe an easy problem but I myself aren't able to solve it. I installed MinGw compiler via ATOMOS and, as described in the help text, the windows 64 bit interface module afterwards, using the link given. After restart my computer and running Scilab I got a huge number of messages like the following Mingw Compiler support for Scilab Load macros Converting Libraries. Build libblasplus.a Conversion failed libblasplus.a Build liblibf2c.a Conversion failed liblibf2c.a Build libcore.a Conversion failed libcore.a Build libcore_f.a ... I've absolute no idea how to handle it. Can anyone help? Thanks in advance Holger Erlanger Stadtwerke AG Vorsitzender des Aufsichtsrats: Oberbuergermeister Dr. Florian Janik Vorstand: Wolfgang Geus (Vorsitzender), Matthias Exner, Frank Oneseit HR B Nr. 539, Amtsgericht, 90762 Fuerth -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Tue Dec 25 22:37:58 2018 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 25 Dec 2018 18:37:58 -0300 Subject: [Scilab-users] Problems with graphics format Message-ID: <5C22A336.7070609@fceia.unr.edu.ar> After creating a figure and plot I need to change the thickness of border around the plot. What property should I change? Besides, I try to change the grid style using gca().grid_style = n*[1, 1] where n is, for instance, 5. I get this: As can be seen, only the horizontal lines of the grid obey the command requiring style 5 (dash and double dot) What is yet weirder, the right border is dashed when it should be solid. Moreover, when manually resizing the figure said border changes randomly showing as solid, dash, dash and dot... The same happens to the uper border when vertically resizing. I'm using Scilab 6.0.1 on Windows 7, 64 bit. Any idea of what may be haening? Merry Christmas! Federico --- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: aeaddbcd.png Type: image/png Size: 57324 bytes Desc: not available URL: From perrichon.pierre at wanadoo.fr Wed Dec 26 10:59:06 2018 From: perrichon.pierre at wanadoo.fr (perrichon) Date: Wed, 26 Dec 2018 10:59:06 +0100 Subject: [Scilab-users] EDGE_TRIGGER (Xcos component) doesn't run under XCOS Message-ID: Dear I try to run a EDGE_TRIGGER under XCOS 5.5.2 Windows 10 to reset an integrator with a basic small program. This program doesn?t run with scilab 5.5.2 and windows 5.5.2. I get the error ? L'?l?ment 3 de la liste n'est pas d?fini. ? See bugzzillla 15914 for the attached file. Best regards Pierre P. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 906 bytes Desc: not available URL: From kostrov65 at yandex.ru Wed Dec 26 14:05:53 2018 From: kostrov65 at yandex.ru (mobile_ghost) Date: Wed, 26 Dec 2018 06:05:53 -0700 (MST) Subject: [Scilab-users] Fortran program call in Scilab 6.01: OMP does not work! Message-ID: <1545829553017-0.post@n3.nabble.com> Hello! I wrote a parallel routine in Fortran using OMP (Intel compiler v.17.0.4) and link it to Scilab 6.01. To my surprise the program uses only one CPU core from 8 available. Besides, the same standalone code uses 8 cores. *Does anybody know what the bug (if any) in Scialab 6.01 and how to bypass it?* My system is Ubuntu 18.04. Intel compiler (ifort version 17.0.4) command is ifort -fPIC -shared -qopenmp grav3d_omp.f90 -o gravda_omp.so Scilab link and call command are: a29=link('modules/gravda_omp.so','gravda','f'); [mgrdm]=call("gravda",a_cells,1,"d",ipar,2,"i",... xgrd,3,"d",ygrd,4,"d", zgrd,5,"d",... mgrdm,6,"d",indsub,7,"i",... frm3d,8,"d",srf,9,"i",logfiles3d,10,"i",... "out",[nr_mgrdm,nc_mgrdm],6,"d"); I made a standalone version ifort -qopenmp grav3d_omp.f90 -o gravda_omp of the same progam and run it from Scilab 6.01 unix_w("gravda_omp"); with the same result: ONLY ONE CPU CORE is used! BUT, when I run it from a terminal window(xfce4-terminal) it works fine. Every CPU core busy 100%. What's the matter? Is there a solution? Thanks in advance. Nick -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html