From sdr at durietz.se Sat Aug 2 22:30:17 2014 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 02 Aug 2014 22:30:17 +0200 Subject: [Scilab-users] printf bug? In-Reply-To: References: <53D7AA5F.6020906@durietz.se> <53D7D4DE.1080005@durietz.se> <53D8070A.9070000@durietz.se> Message-ID: <53DD4A59.8070901@durietz.se> Thank you, Leon, it confirms that Scilab 5.4.1 handles it correctly. But when I have LC_NUMERIC="en_DK.utf8" which means decimal comma, see below, Scilab is in error: -->msprintf("%0.2f", %pi) ans = 3,14 -->msprintf("%0.2f", 3.1416) ans = 3,14 Compare the correct handling in Python: >>> "Pi with two decimals is %0.2f" % 3.1416 'Pi with two decimals is 3.14' Can any of the developers comment on this, or shall I report a bug? Regards Stefan stefan at Asus1:~$ uname -a Linux Asus1 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:12 UTC 2014 i686 i686 i686 GNU/Linux stefan at Asus1:~$ locale LANG=en_GB.UTF-8 LANGUAGE=en_GB:en LC_CTYPE="en_DK.utf8" LC_NUMERIC="en_DK.utf8" LC_TIME="en_DK.utf8" LC_COLLATE="en_DK.utf8" LC_MONETARY="en_DK.utf8" LC_MESSAGES="en_DK.utf8" LC_PAPER="en_DK.utf8" LC_NAME="en_DK.utf8" LC_ADDRESS="en_DK.utf8" LC_TELEPHONE="en_DK.utf8" LC_MEASUREMENT="en_DK.utf8" LC_IDENTIFICATION="en_DK.utf8" LC_ALL=en_DK.utf8 On 2014-07-30 07:25, Leon Bevc wrote: > Here is output from openSuse 13.1 and Scilab 5.4.1: > --------------------------- > lebevc at linux-xkf0:~> uname -a > Linux linux-xkf0.site 3.15.3-1.g42bf625-desktop #1 SMP PREEMPT > Wed Jul 2 09:23:08 UTC 2014 (42bf625) x86_64 x86_64 x86_64 GNU/Linux > --------------------------- > lebevc at linux-xkf0:~> locale > LANG=sl_SI.UTF-8 > LC_CTYPE="sl_SI.UTF-8" > LC_NUMERIC="sl_SI.UTF-8" > LC_TIME="sl_SI.UTF-8" > LC_COLLATE="sl_SI.UTF-8" > LC_MONETARY="sl_SI.UTF-8" > LC_MESSAGES="sl_SI.UTF-8" > LC_PAPER="sl_SI.UTF-8" > LC_NAME="sl_SI.UTF-8" > LC_ADDRESS="sl_SI.UTF-8" > LC_TELEPHONE="sl_SI.UTF-8" > LC_MEASUREMENT="sl_SI.UTF-8" > LC_IDENTIFICATION="sl_SI.UTF-8" > LC_ALL= > --------------------------- > lebevc at linux-xkf0:~> printf "%0.2f\n" 3.1416 > bash: printf: 3.1416: invalid number > 0,00 > lebevc at linux-xkf0:~> printf "%0.2f\n" 3,1416 > 3,14 > > //-----Scilab--------------------- > > -->ver > Scilab Version: 5.4.1.1364497457 > > -->x = 0.12345 > x = > 0.12345 > > -->xstr = msprintf("%0.2f", x) > xstr = > 0.12 > > > 2014-07-29 22:41 GMT+02:00 Stefan Du Rietz >: > > Leon, Can you please try it with Scilab 5.4.1 under openSUSE? And > can you show its Bash output from > $ locale > > When I was running Scilab 5.4.1 under Xubuntu 12.04, printf worked > OK, but also in Bash. So the question is: Why do you now get > different results in Scilab and Bash? > > And *the important point*: Why should a mathematics program handle > inputs differently from outputs? > > If one should handle decimal separators differently depending on > the local language, it should be done consistently (as in Bash, > even if I don't like it)! > > One could of course have special functions or arguments to present > numbers in specific local formats. > > Stefan > > > > On 2014-07-29 19:41, Leon Bevc wrote: > > Strange... > > In this case I got the same result as you on Xubuntu and openSUSE: > > [ xUbuntu 14.04.1 - 32bit / Scilab 5.5.0 / LANG=sl_SI.UTF-8 ] > lebevc at book-PC:~$ printf "%0.2f\n" 3.1416 > bash: printf: 3.1416: neveljavno ?tevilo > 0,00 > lebevc at book-PC:~$ printf "%0.2f\n" 3,1416 > 3,14 > > ------------------------------__------------------------------__---------- > [ openSUSE 13.1-64bit ; Scilab 5.4.1] > lebevc at linux-xkf0:~> printf "%0.2f\n" 3.1416 > bash: printf: 3.1416: invalid number > 0,00 > lebevc at linux-xkf0:~> printf "%0.2f\n" 3,1416 > 3,14 > > -->x = 0.6231166; > -->xstr = msprintf("%0.2f", x) > xstr = > 0.62 > > > _________________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/__mailman/listinfo/users > > > > > _________________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/__mailman/listinfo/users > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Sat Aug 2 22:35:25 2014 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 02 Aug 2014 22:35:25 +0200 Subject: [Scilab-users] printf bug? In-Reply-To: <53DD4A59.8070901@durietz.se> References: <53D7AA5F.6020906@durietz.se> <53D7D4DE.1080005@durietz.se> <53D8070A.9070000@durietz.se> <53DD4A59.8070901@durietz.se> Message-ID: <53DD4B8D.4090908@durietz.se> With "Scilab" here, I mean Scilab 5.5.0. On 2014-08-02 22:30, Stefan Du Rietz wrote: > Thank you, Leon, > it confirms that Scilab 5.4.1 handles it correctly. > > But when I have LC_NUMERIC="en_DK.utf8" which means decimal comma, see > below, Scilab is in error: > -->msprintf("%0.2f", %pi) > ans = > 3,14 > -->msprintf("%0.2f", 3.1416) > ans = > 3,14 > > Compare the correct handling in Python: > >>> "Pi with two decimals is %0.2f" % 3.1416 > 'Pi with two decimals is 3.14' > > Can any of the developers comment on this, or shall I report a bug? > > Regards > Stefan > > stefan at Asus1:~$ uname -a > Linux Asus1 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:12 UTC > 2014 i686 i686 i686 GNU/Linux > stefan at Asus1:~$ locale > LANG=en_GB.UTF-8 > LANGUAGE=en_GB:en > LC_CTYPE="en_DK.utf8" > LC_NUMERIC="en_DK.utf8" > LC_TIME="en_DK.utf8" > LC_COLLATE="en_DK.utf8" > LC_MONETARY="en_DK.utf8" > LC_MESSAGES="en_DK.utf8" > LC_PAPER="en_DK.utf8" > LC_NAME="en_DK.utf8" > LC_ADDRESS="en_DK.utf8" > LC_TELEPHONE="en_DK.utf8" > LC_MEASUREMENT="en_DK.utf8" > LC_IDENTIFICATION="en_DK.utf8" > LC_ALL=en_DK.utf8 > > > On 2014-07-30 07:25, Leon Bevc wrote: >> Here is output from openSuse 13.1 and Scilab 5.4.1: >> --------------------------- >> lebevc at linux-xkf0:~> uname -a >> Linux linux-xkf0.site 3.15.3-1.g42bf625-desktop #1 SMP PREEMPT >> Wed Jul 2 09:23:08 UTC 2014 (42bf625) x86_64 x86_64 x86_64 GNU/Linux >> --------------------------- >> lebevc at linux-xkf0:~> locale >> LANG=sl_SI.UTF-8 >> LC_CTYPE="sl_SI.UTF-8" >> LC_NUMERIC="sl_SI.UTF-8" >> LC_TIME="sl_SI.UTF-8" >> LC_COLLATE="sl_SI.UTF-8" >> LC_MONETARY="sl_SI.UTF-8" >> LC_MESSAGES="sl_SI.UTF-8" >> LC_PAPER="sl_SI.UTF-8" >> LC_NAME="sl_SI.UTF-8" >> LC_ADDRESS="sl_SI.UTF-8" >> LC_TELEPHONE="sl_SI.UTF-8" >> LC_MEASUREMENT="sl_SI.UTF-8" >> LC_IDENTIFICATION="sl_SI.UTF-8" >> LC_ALL= >> --------------------------- >> lebevc at linux-xkf0:~> printf "%0.2f\n" 3.1416 >> bash: printf: 3.1416: invalid number >> 0,00 >> lebevc at linux-xkf0:~> printf "%0.2f\n" 3,1416 >> 3,14 >> >> //-----Scilab--------------------- >> >> -->ver >> Scilab Version: 5.4.1.1364497457 >> >> -->x = 0.12345 >> x = >> 0.12345 >> >> -->xstr = msprintf("%0.2f", x) >> xstr = >> 0.12 >> >> >> 2014-07-29 22:41 GMT+02:00 Stefan Du Rietz > >: >> >> Leon, Can you please try it with Scilab 5.4.1 under openSUSE? And >> can you show its Bash output from >> $ locale >> >> When I was running Scilab 5.4.1 under Xubuntu 12.04, printf worked >> OK, but also in Bash. So the question is: Why do you now get >> different results in Scilab and Bash? >> >> And *the important point*: Why should a mathematics program handle >> inputs differently from outputs? >> >> If one should handle decimal separators differently depending on >> the local language, it should be done consistently (as in Bash, >> even if I don't like it)! >> >> One could of course have special functions or arguments to present >> numbers in specific local formats. >> >> Stefan >> >> >> >> On 2014-07-29 19:41, Leon Bevc wrote: >> >> Strange... >> >> In this case I got the same result as you on Xubuntu and >> openSUSE: >> >> [ xUbuntu 14.04.1 - 32bit / Scilab 5.5.0 / LANG=sl_SI.UTF-8 ] >> lebevc at book-PC:~$ printf "%0.2f\n" 3.1416 >> bash: printf: 3.1416: neveljavno ?tevilo >> 0,00 >> lebevc at book-PC:~$ printf "%0.2f\n" 3,1416 >> 3,14 >> >> >> ------------------------------__------------------------------__---------- >> >> [ openSUSE 13.1-64bit ; Scilab 5.4.1] >> lebevc at linux-xkf0:~> printf "%0.2f\n" 3.1416 >> bash: printf: 3.1416: invalid number >> 0,00 >> lebevc at linux-xkf0:~> printf "%0.2f\n" 3,1416 >> 3,14 >> >> -->x = 0.6231166; >> -->xstr = msprintf("%0.2f", x) >> xstr = >> 0.62 >> >> >> _________________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/__mailman/listinfo/users >> >> >> >> >> _________________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/__mailman/listinfo/users >> >> >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From Floyd.Xu at ka-group.com Sat Aug 2 09:59:33 2014 From: Floyd.Xu at ka-group.com (Floyd Xu) Date: Sat, 2 Aug 2014 07:59:33 +0000 Subject: [Scilab-users] A question about plotting Message-ID: Hi , All: I have a question about plotting. I want to plot 2 lines in a graphic , so I type the command as below: -->x=linspace(0,2*%pi,40); -->y1=sin(x) -->y2=cos(x); -->X=[x,x]; -->Y=[y1,y2]; Then , I type the plot command : -->plot(x,y1,x,y2); The result is shown as below: [Graphic window number 0 (2).bmp] But when I type a command as below: -->plot(X,Y); The result is : [Graphic window number 0.bmp] It has an additional line. Why will this line appear? Thanks for your reply. [cid:image1d1b4c.JPG at 1409fa80.42bc79fd] Floyd Xu Electronic System Design Engineer | Driveline Office: +86 510 8528 5478 | Mobile: +86 137 7106 3561 | Floyd.Xu at ka-group.com Kongsberg Automotive | No 30 & 32 Xikun Road, Wuxi Singapore Ind. Park | Wuxi | Jiangsu 214028 | CN Tel: +86 510 8528 2165 | www.kongsbergautomotive.com Enhancing the driving experience -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 13383 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 11917 bytes Desc: image002.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image1d1b4c.JPG Type: image/jpeg Size: 11637 bytes Desc: image1d1b4c.JPG URL: From Serge.Steer at inria.fr Mon Aug 4 10:25:37 2014 From: Serge.Steer at inria.fr (Serge Steer) Date: Mon, 04 Aug 2014 10:25:37 +0200 Subject: [Scilab-users] A question about plotting In-Reply-To: References: Message-ID: <53DF4381.7030701@inria.fr> Le 02/08/2014 09:59, Floyd Xu a ?crit : > > Hi , All: > > I have a question about plotting. > > I want to plot 2 lines in a graphic , so I type the command as below: > > -->x=linspace(0,2*%pi,40); > > -->y1=sin(x) > > -->y2=cos(x); > > -->X=[x,x]; > > -->Y=[y1,y2]; > Generating X and Y creates row vectors. if you want to draw several curves with one plot instruction, each curve must be passed as a column of an array -->X=[x;x]'; -->Y=[y1;y2]'; -->plot(X,Y) or simpler plot(x',Y) Then , I type the plot command : > > -->plot(x,y1,x,y2); > > The result is shown as below: > > Graphic window number 0 (2).bmp > > But when I type a command as below: > > -->plot(X,Y); > > The result is : > > Graphic window number 0.bmp > > It has an additional line. > > Why will this line appear? > > Thanks for your reply. > > > > > > Floyd Xu > Electronic System Design Engineer | Driveline > Office: +86 510 8528 5478 | Mobile: +86 137 7106 3561 | > Floyd.Xu at ka-group.com > Kongsberg Automotive | No 30 & 32 Xikun Road, Wuxi Singapore Ind. > Park | Wuxi | Jiangsu 214028 | CN > Tel: +86 510 8528 2165 | www.kongsbergautomotive.com > > Enhancing the driving experience > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 13383 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 11917 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 11637 bytes Desc: not available URL: From akhorshidi at live.com Tue Aug 5 08:35:54 2014 From: akhorshidi at live.com (A Khorshidi) Date: Tue, 5 Aug 2014 11:05:54 +0430 Subject: [Scilab-users] Scilab and Matlab integer representation Message-ID: Hi; One reason for using integer type is to save memory space, isn't it? However, whos() gives us 24 bytes as storage space for both integer and double data types. var1 = int8(23); // 1 byte integer representation whos -name var1 var2 = 23; whos -name var2 In contrast, Matlab's whos() returns 1 byte for int8 data type and 8 bytes for double precision number. And another case, For values larger than the maximum value of a given integer data type (e.g. 127 for int8) Scilab and Matlab return different values. For example, Scilab's result for int8(200) is -56 but Matlab's result will be 127 (the largest value which can be stored in this data type). Could anyone discuss on these different results returned by Scilab and Matalb? And specially the source of the differences? Thank you. Regards, Mehran _ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aweeks at hidglobal.com Tue Aug 5 09:38:17 2014 From: aweeks at hidglobal.com (aweeks at hidglobal.com) Date: Tue, 5 Aug 2014 08:38:17 +0100 Subject: [Scilab-users] Scilab and Matlab integer representation In-Reply-To: References: Message-ID: Hi Mehran, I can't give you any explanation (and I've never really questioned these points myself) but you may find some sections of these documents interesting or useful. They both mention integer value ranges. www.scilab.org/content/download/247/1702/file/introscilab.pdf page 25 http://wiki.scilab.org/Tutorials?action=AttachFile&do=view&target=Scilab4Matlab.pdf page 18 Best wishes, Adrian. Adrian Weeks Development Engineer HID Global, 3 Cae Gwyrdd, Green Meadow Springs Business Park, Cardiff CF15 7AB, United Kingdom. +44 (0)29 20528523 (Office) aweeks at hidglobal.com www.hidglobal.com From: A Khorshidi To: Scilab Users Date: 05/08/2014 07:36 Subject: [Scilab-users] Scilab and Matlab integer representation Sent by: "users" Hi; One reason for using integer type is to save memory space, isn't it? However, whos() gives us 24 bytes as storage space for both integer and double data types. var1 = int8(23); // 1 byte integer representation whos -name var1 var2 = 23; whos -name var2 In contrast, Matlab's whos() returns 1 byte for int8 data type and 8 bytes for double precision number. And another case, For values larger than the maximum value of a given integer data type (e.g. 127 for int8) Scilab and Matlab return different values. For example, Scilab's result for int8(200) is -56 but Matlab's result will be 127 (the largest value which can be stored in this data type). Could anyone discuss on these different results returned by Scilab and Matalb? And specially the source of the differences? Thank you. Regards, Mehran _ _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 12347310.gif Type: image/gif Size: 4559 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ecblank.gif Type: image/gif Size: 45 bytes Desc: not available URL: From Christophe.Dang at sidel.com Tue Aug 5 09:41:04 2014 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 5 Aug 2014 09:41:04 +0200 Subject: [Scilab-users] Scilab and Matlab integer representation In-Reply-To: References: Message-ID: <3B5FFC67498DFF49AE7271A584867D16F40B8974A3@301EX00100.sidel.com> Hello, concerning the second point > De : A Khorshidi > Envoy? : mardi 5 ao?t 2014 08:36 > > For example, Scilab's result for int8(200) is -56 but Matlab's result will be 127 > (the largest value which can be stored in this data type). Such a case should be handled uniformely, which would mean described in a standard. The only "right" answer would be a special value, indicating the overflow. Such special values are in the IEEE 754 standard for floating point representation, but int8 represent few values (256), who would waste one value to implement an error code? IMHO, this is our responsability as programmers to make sure that we use adapted representations for our values. -- Christophe Dang Ngoc Chan Mechanical calculation engineer ______________________________________________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ______________________________________________________________________ From sgougeon at free.fr Tue Aug 5 13:59:37 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 05 Aug 2014 13:59:37 +0200 Subject: [Scilab-users] Scilab and Matlab integer representation In-Reply-To: References: Message-ID: <53E0C729.8060008@free.fr> Hello Mehran, Le 05/08/2014 08:35, A Khorshidi a ?crit : > Hi; > > One reason for using integer type is to save memory space, isn't it? > However, whos() gives us 24 bytes as storage space for both integer > and double data types. A scalar number is considered as a 1x1 matrix. For any matrix, some room is needed to record the number of rows, of columns, the type of the matrix, etc. If you do the same test for a large matrix, the memory used becomes asymptotically proportionnal to the matrix size: -->var1 = int8(rand(1000,1000)*64); // 1 byte integer representation -->whos -name var1 Name Type Size Bytes var1 int8 1000 by 1000 1000024 The way how Scilab stores variables in memory is described here: http://wiki.scilab.org/Memory%20representation%20of%20variables Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Aug 5 14:54:31 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 05 Aug 2014 14:54:31 +0200 Subject: [Scilab-users] Scilab and Matlab integer representation In-Reply-To: References: Message-ID: <53E0D407.4020301@free.fr> About that: Le 05/08/2014 08:35, A Khorshidi a ?crit : > .../... > And another case, > For values larger than the maximum value of a given integer data type > (e.g. 127 for int8) Scilab and Matlab return different values. > For example, Scilab's result for int8(200) is -56 but Matlab's result > will be 127 (the largest value which can be stored in this data type). Scilab wraps integer overflows (200 - 2^8 = -56), whereas Octave saturates. When overflowing an integer, "R" delivers a "NA" value (Not Available). I have no opinion about the best way to deal with integer overflow when designing the language. This kind of topic has been discussed when designing the bitshift() function for Scilab: http://bugzilla.scilab.org/show_bug.cgi?id=9006#c8 Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From akhorshidi at live.com Tue Aug 5 16:34:11 2014 From: akhorshidi at live.com (A Khorshidi) Date: Tue, 5 Aug 2014 07:34:11 -0700 (PDT) Subject: [Scilab-users] Scilab and Matlab integer representation In-Reply-To: <53E0D407.4020301@free.fr> References: <53E0D407.4020301@free.fr> Message-ID: <1407249251458-4031007.post@n3.nabble.com> Thank you All; aweeks wrote > http://wiki.scilab.org/Tutorials?action=AttachFile&do=view&target=Scilab4Matlab.pdf > page 18 Yes, this document point out the second case nice. Dang, Christophe wrote > The only "right" answer would be a special value, indicating the overflow. Yes, exactly. Dang, Christophe wrote > but int8 represent few values (256), who would waste one value to > implement an error code? Really who? ;) Samuel GOUGEON wrote > If you do the same test for a large matrix, the memory used becomes > asymptotically proportionnal to the matrix size: But how much proportional? According to the link you provided, we reach to the golden formula below to compute the amount the memory used by a Scilab variable: for doubles data type: Number_of_Bytes = Bytes_of_Header + Array_Dim * Bytes_of_theDataType for integer data type: Number_of_Bytes = Bytes_of_Header + Array_Dim * Bytes_of_theDataType + An_Unknown_Amount What do you think of the "An_Unknown_Amount"? Although that document describe doubles, booleans, string, polynomials, ... in detail, we cannot find anything about integer data types. So let me continue with some example: -->Doubles = [ 1 , 2 , 3 ; 4 , 5 , 6 ]; -->whos -name Doubles Name Type Size Bytes Doubles constant 2 by 3 64 -->Number_of_Bytes = (4*4) + (size(Doubles,'*')*8) Number_of_Bytes = 64. -->Integers = int8([ 1 , 2 , 3 ; 4 , 5 , 6 ]); -->whos -name Integers Name Type Size Bytes Integers int8 2 by 3 24 -->Number_of_Bytes = (4*4) + (size(Integers,'*')*1) Number_of_Bytes = 22. Then we have An_Unknown_Amount = 24-22=2 So the question is, What is the "An_Unknown_Amount"? Merci, Mehran _ -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Scilab-and-Matlab-integer-representation-tp4031002p4031007.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From kpiroddi at gmail.com Tue Aug 5 21:27:58 2014 From: kpiroddi at gmail.com (Kelvin Piroddi) Date: Tue, 5 Aug 2014 21:27:58 +0200 Subject: [Scilab-users] Using the mopen function on a apple Message-ID: <7122613C-58D5-4365-9CDA-83A82A1DA26B@gmail.com> I am trying to open a file using the mopen function, but i keep getting the ?Cannot open file error?. Not to sure if different syntax is required on a mac for the file address? Thanks From Christophe.Dang at sidel.com Wed Aug 6 09:27:26 2014 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 6 Aug 2014 09:27:26 +0200 Subject: [Scilab-users] Using the mopen function on a apple In-Reply-To: <7122613C-58D5-4365-9CDA-83A82A1DA26B@gmail.com> References: <7122613C-58D5-4365-9CDA-83A82A1DA26B@gmail.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F40B897AFC@301EX00100.sidel.com> Hello, > De la part de Kelvin Piroddi > Envoy? : mardi 5 ao?t 2014 21:28 > > I am trying to open a file using the mopen function, but i keep getting the > 'Cannot open file error'. Maybe you could provide us a minimal example that generates the error: a small file you try to open (or a few code lines that generate a small file) and the code line you use to open it. Best regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer ______________________________________________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ______________________________________________________________________ From breitu at arcor.de Wed Aug 6 10:42:33 2014 From: breitu at arcor.de (breitu) Date: Wed, 6 Aug 2014 01:42:33 -0700 (PDT) Subject: [Scilab-users] Suddenly execution of programs started in scinotes as exec(**, -1) Message-ID: <1407314553370-4031010.post@n3.nabble.com> I run a scilab program from the scinotes using the execute button. It ended with an error. Now, when I hit the execute button in scinotes to run it again, the following message appears in the console: exec('/home/karl/DATA/programmesci/minimize.sci', -1) and I get nothing else on the screen. What did i do wrong? Thanks -- View this message in context: http://mailinglists.scilab.org/Suddenly-execution-of-programs-started-in-scinotes-as-exec-1-tp4031010.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Wed Aug 6 10:54:47 2014 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Wed, 6 Aug 2014 10:54:47 +0200 Subject: [Scilab-users] Suddenly execution of programs started in scinotes as exec(**, -1) In-Reply-To: <1407314553370-4031010.post@n3.nabble.com> References: <1407314553370-4031010.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F40B897BEC@301EX00100.sidel.com> Hello, > De la part de breitu > Envoy? : mercredi 6 ao?t 2014 10:43 > > I run a scilab program from the scinotes using the execute button. > It ended with an error. Maybe you did not exit in the level 0 environment. Does the prompt look like -1-> or something like that? Then try abort() HTH -- Christophe Dang Ngoc Chan Mechanical calculation engineer ______________________________________________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ______________________________________________________________________ From j.s.strom at hslmg.de Fri Aug 8 20:35:21 2014 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Fri, 8 Aug 2014 18:35:21 +0000 (UTC) Subject: [Scilab-users] Recognition of cursor key as input Message-ID: Is there a way to stop a loop at each cycle and continue it by pressing one of the cursor keys (up, down, left or right) so that the script 'knows' which key has been pressed? I experimented with the input command with no result. Kind regards Jens From p.muehlmann at gmail.com Sat Aug 9 06:13:50 2014 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Sat, 9 Aug 2014 07:13:50 +0300 Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: References: Message-ID: Hallo Jens, I am not quite sure if there is a way for the cursor keys, but using "messagebox", "x_dialog" or "x_choices" should fullfill your purpose. I understand that you want the loop to stop and just go on after a keyboard command. So if you use one of the functions mentioned above a popo up window will appear, whihc you can use to have someting like " go on" (to go back to the loop) or "abort"(to quit the loop). you may also use "pause". Best regars, Philipp 2014-08-08 21:35 GMT+03:00 Jens Simon Strom : > Is there a way to stop a loop at each cycle and continue it by pressing one > of the cursor keys (up, down, left or right) so that the script 'knows' > which key has been pressed? I experimented with the input command with no > result. > Kind regards > Jens > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- There we have the salad. From weijiang at hdu.edu.cn Fri Aug 8 09:55:06 2014 From: weijiang at hdu.edu.cn (Jonah) Date: Fri, 8 Aug 2014 00:55:06 -0700 (PDT) Subject: [Scilab-users] How to solve sparse nonlinear system by scilabe Message-ID: <1407484505953-4031012.post@n3.nabble.com> Hello, I'm trying to solve a pressure-flow network system which is sparse, nonliear and huge, around 1k-2k variables. It seems to me fsolve in scilab can't handle such kind of the problem quite efficiently. Do you have good suggestion for solve sparse nonlinear system using scilab? Thanks a lot. Regards, Jonah -- View this message in context: http://mailinglists.scilab.org/How-to-solve-sparse-nonlinear-system-by-scilabe-tp4031012.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From mjmccann at ieee.org Mon Aug 11 14:29:24 2014 From: mjmccann at ieee.org (Michael J McCann) Date: Mon, 11 Aug 2014 12:29:24 +0000 Subject: [Scilab-users] How to solve sparse nonlinear system by scilabe In-Reply-To: <1407484505953-4031012.post@n3.nabble.com> References: <1407484505953-4031012.post@n3.nabble.com> Message-ID: <53E8B724.3030006@ieee.org> Since the network is passive and hence stable, have you considered treating it as a pseudo-dynamic system (by giving capacity to hold fluid to each sector) and letting it converge to a solution as the flow adjusts itself to equilibrium? We used to do this sort of trick with analog computers many years ago and electrical resistance networks actually behave that way. Mike. On 2014-08-08 7:55, Jonah wrote: > Hello, > > I'm trying to solve a pressure-flow network system which is sparse, nonliear > and huge, around 1k-2k variables. It seems to me fsolve in scilab can't > handle such kind of the problem quite efficiently. > > Do you have good suggestion for solve sparse nonlinear system using scilab? > Thanks a lot. > > Regards, > > Jonah > > > > -- > View this message in context: http://mailinglists.scilab.org/How-to-solve-sparse-nonlinear-system-by-scilabe-tp4031012.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -- Dr.M.J.McCann,MJMcCann-Consulting From stephane.mottelet at utc.fr Mon Aug 11 16:03:54 2014 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Mon, 11 Aug 2014 16:03:54 +0200 Subject: [Scilab-users] How to solve sparse nonlinear system by scilabe In-Reply-To: <53E8B724.3030006@ieee.org> References: <1407484505953-4031012.post@n3.nabble.com> <53E8B724.3030006@ieee.org> Message-ID: <53E8CD4A.5020502@utc.fr> Hello, fsolve cannot handle a sparse jacobian, but if you use the Newton's method (less than 5 lines of Scilab code), the sparsity of the jacobian will be taken into account in the linear system resolution step. S. Le 11/08/2014 14:29, Michael J McCann a ?crit : > Since the network is passive and hence stable, have you considered > treating it as a pseudo-dynamic system (by giving capacity to hold > fluid to each sector) and letting it converge to a solution as the > flow adjusts itself to equilibrium? We used to do this sort of trick > with analog computers many years ago and electrical resistance > networks actually behave that way. Mike. > On 2014-08-08 7:55, Jonah wrote: >> Hello, >> >> I'm trying to solve a pressure-flow network system which is sparse, >> nonliear >> and huge, around 1k-2k variables. It seems to me fsolve in scilab can't >> handle such kind of the problem quite efficiently. >> >> Do you have good suggestion for solve sparse nonlinear system using >> scilab? >> Thanks a lot. >> >> Regards, >> >> Jonah >> >> >> >> -- >> View this message in context: >> http://mailinglists.scilab.org/How-to-solve-sparse-nonlinear-system-by-scilabe-tp4031012.html >> Sent from the Scilab users - Mailing Lists Archives mailing list >> archive at Nabble.com. >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > From sgougeon at free.fr Mon Aug 11 18:36:19 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 11 Aug 2014 18:36:19 +0200 Subject: [Scilab-users] How to solve sparse nonlinear system by scilabe In-Reply-To: <1407484505953-4031012.post@n3.nabble.com> References: <1407484505953-4031012.post@n3.nabble.com> Message-ID: <53E8F103.4090607@free.fr> Le 08/08/2014 09:55, Jonah a ?crit : > Hello, > > I'm trying to solve a pressure-flow network system which is sparse, nonliear > and huge, around 1k-2k variables. It seems to me fsolve in scilab can't > handle such kind of the problem quite efficiently. > > Do you have good suggestion for solve sparse nonlinear system using scilab? > Thanks a lot. Have you tried Metanet: http://atoms.scilab.org/toolboxes/metanet I do not know if it is relevant for your specific case, but it is the main Scilab module dealing with network problems. To use it, download and install it through the ATOMS GUI (run: --> atomsGui ) Other modules dealing with graphs are listed here: http://atoms.scilab.org/categories/graphs HTH Regards Samuel From johnfulgor at yahoo.com Mon Aug 11 21:51:11 2014 From: johnfulgor at yahoo.com (john fulgor) Date: Mon, 11 Aug 2014 20:51:11 +0100 Subject: [Scilab-users] Persistent data in scicos computational functions Message-ID: <1407786671.51467.YahooMailNeo@web172804.mail.ir2.yahoo.com> Hello all, I'm trying to create a new scicos block, based on a scilab computational function. The computational function creates some constant matrices at start, derived from the parameters, that it uses these matrices all through the simulation. My question is this: where can I store these matrices? Am I supposed to re-compute them all times the function is called? Or: should I store them someway in the discrete state vector, reshaping them someway? And what are the "Discrete state objects" mentioned in the model documentation? Thank you very much! John From j.s.strom at hslmg.de Mon Aug 11 10:52:28 2014 From: j.s.strom at hslmg.de (Jens) Date: Mon, 11 Aug 2014 01:52:28 -0700 (PDT) Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: References: Message-ID: <1407747148340-4031015.post@n3.nabble.com> Hello Philipp, I'm aware of "messagebox", "x_dialog" or "x_choices". I fear the abbreviated way I'm looking for does not exist. Kind regards Jens -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031015.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Tue Aug 12 12:56:52 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 12 Aug 2014 12:56:52 +0200 Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: References: Message-ID: <53E9F2F4.6080208@free.fr> Hello, Le 08/08/2014 20:35, Jens Simon Strom a ?crit : > Is there a way to stop a loop at each cycle and continue it by pressing one > of the cursor keys (up, down, left or right) so that the script 'knows' > which key has been pressed? I experimented with the input command with no > result. This topic has been somewhat considered for instance in this thread: http://mailinglists.scilab.org/Re-user-terminate-program-exit-while-loop-tt4030794.html Samuel From mjmccann at ieee.org Tue Aug 12 12:54:13 2014 From: mjmccann at ieee.org (Michael J McCann) Date: Tue, 12 Aug 2014 10:54:13 +0000 Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: <1407747148340-4031015.post@n3.nabble.com> References: <1407747148340-4031015.post@n3.nabble.com> Message-ID: <53E9F255.4050909@ieee.org> I don't know if this will help but I wrote simulation software in Pascal and so that it could respond to mouse clicks anywhere while running it made a check to look for it at the end of every single integration step. I guess you might be able to check for keyboard input repeatedly. Mike. On 2014-08-11 8:52, Jens wrote: > Hello Philipp, > I'm aware of "messagebox", "x_dialog" or "x_choices". I fear the abbreviated > way I'm looking for does not exist. > Kind regards > Jens > > > > -- > View this message in context: http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031015.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -- Dr.M.J.McCann,MJMcCann-Consulting From sgougeon at free.fr Tue Aug 12 13:38:19 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 12 Aug 2014 13:38:19 +0200 Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: References: Message-ID: <53E9FCAB.6020207@free.fr> Le 08/08/2014 20:35, Jens Simon Strom a ?crit : > Is there a way to stop a loop at each cycle and continue it by pressing one > of the cursor keys (up, down, left or right) so that the script 'knows' > which key has been pressed? I experimented with the input command with no > result. If you succeed in implementing your code with these keys to route and process, it might be not really portable. The following link could be of interest: http://stackoverflow.com/questions/2876275/what-are-the-ascii-values-of-up-down-left-right Samuel From Serge.Steer at inria.fr Tue Aug 12 18:25:11 2014 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 12 Aug 2014 18:25:11 +0200 Subject: [Scilab-users] Persistent data in scicos computational functions In-Reply-To: <1407786671.51467.YahooMailNeo@web172804.mail.ir2.yahoo.com> References: <1407786671.51467.YahooMailNeo@web172804.mail.ir2.yahoo.com> Message-ID: <53EA3FE7.8050609@inria.fr> Le 11/08/2014 21:51, john fulgor a ?crit : > Hello all, > I'm trying to create a new scicos block, based on a scilab computational function. The computational function creates some constant matrices at start, derived from the parameters, that it uses these matrices all through the simulation. My question is this: where can I store these matrices? Am I supposed to re-compute them all times the function is called? of course not > Or: should I store them someway in the discrete state vector, reshaping them someway? for exemple, but it is better using the work array. For reshaping it depends if your computational function is written in Scilab or in C > And what are the "Discrete state objects" mentioned in the model documentation? odstate can be used to store discrete states mainly defined by Scilab data structures. > > Thank you very much! > John > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From j.s.strom at hslmg.de Tue Aug 12 14:27:52 2014 From: j.s.strom at hslmg.de (Jens) Date: Tue, 12 Aug 2014 05:27:52 -0700 (PDT) Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: <53E9FCAB.6020207@free.fr> References: <53E9FCAB.6020207@free.fr> Message-ID: <1407846472710-4031026.post@n3.nabble.com> Hi Samuel, ASCII representation of up, down etc. would help me if I knew a Scilab command which puts the ascii value into a variable. input() is definitely unable to do so. Jens -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031026.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From ebmb.sci at gmail.com Wed Aug 13 03:11:41 2014 From: ebmb.sci at gmail.com (ebmb.sci) Date: Tue, 12 Aug 2014 18:11:41 -0700 (PDT) Subject: [Scilab-users] Optimization question Message-ID: <1407892301423-4031028.post@n3.nabble.com> Hello All, please, could someone guide me on how to proceed to minimize the following polynomial using functions optim and numdiff. Since the parameters A and B have different constraints (i.e.: A = [0 1] and B = [1000 2000]), how must I sign the values and pass them for optim? I implemented a basic script to try to do it, but it always returns with wrong results. function f = myFc(x) a = x(1); b = x(2); f = 0.000791 + 0.000027*a + -0.000037*b + 0.000180*a*b + -0.000126*a^2 + -0.000162*b^2; endfunction function [f, g, ind] = myFcCost(x, ind) f = myFc(x); g = numdiff(myFc, x); endfunction x0 = [0 1]; [fopt, xopt] = optim(myFcCost, 'b', [0 1], [1000 2000], x0); I am so thanks for any help in advance! Best regards, Eduardo. -- View this message in context: http://mailinglists.scilab.org/Optimization-question-tp4031028.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From stephane.mottelet at utc.fr Wed Aug 13 09:14:41 2014 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Wed, 13 Aug 2014 09:14:41 +0200 Subject: [Scilab-users] Optimization question In-Reply-To: <1407892301423-4031028.post@n3.nabble.com> References: <1407892301423-4031028.post@n3.nabble.com> Message-ID: <53EB1061.1040506@utc.fr> Le 13/08/2014 03:11, ebmb.sci a ?crit : > Hello All, > please, could someone guide me on how to proceed to minimize the following > polynomial using functions optim and numdiff. Since the parameters A and B > have different constraints (i.e.: A = [0 1] and B = [1000 2000]), how must I > sign the values and pass them for optim? I implemented a basic script to try > to do it, but it always returns with wrong results. > > function f = myFc(x) > a = x(1); > b = x(2); > f = 0.000791 + 0.000027*a + -0.000037*b + 0.000180*a*b + -0.000126*a^2 + > -0.000162*b^2; > endfunction > > function [f, g, ind] = myFcCost(x, ind) > f = myFc(x); > g = numdiff(myFc, x); > endfunction > > x0 = [0 1]; > > [fopt, xopt] = optim(myFcCost, 'b', [0 1], [1000 2000], x0); > > I am so thanks for any help in advance! > > Best regards, > Eduardo. Hello, your bounds should be given this way (first vector for lower bounds and second for upper ones) : [fopt, xopt] = optim(myFcCost, 'b', [0 1000], [1 2000], x0); S. > > > > > -- > View this message in context: http://mailinglists.scilab.org/Optimization-question-tp4031028.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From stephane.mottelet at utc.fr Wed Aug 13 11:10:24 2014 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Wed, 13 Aug 2014 11:10:24 +0200 Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: <1407846472710-4031026.post@n3.nabble.com> References: <53E9FCAB.6020207@free.fr> <1407846472710-4031026.post@n3.nabble.com> Message-ID: <20140813111024.Horde.Hc-sr4Z-24Ie7jJkRN_21g1@webmail2.utc.fr> Hello, IMHO, the only way to trap a keypress and get the ascii (?) code is to use the event_handler callback of a figure : function handler(x,y,ibut) // endfunction f=gcf(); f.event_handler='handler'; ?f.event_handle_enable='on'; On my computer, I have the following mapping? left arrow pressed : ibut=37 (released=-37) up arrow : 38 right arrow 39 down arrow 40 The problem is that you need to have a figure opened, and that this figure must have the focus. S. Jens a ?crit?: > Hi Samuel, > ASCII representation of up, down etc. would help me if I knew a Scilab > command which puts the ascii value into a variable. input() is definitely > unable to do so. > > Jens > > -- > View this message in context: > http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031026.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive > at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Wed Aug 13 13:05:06 2014 From: j.s.strom at hslmg.de (Jens) Date: Wed, 13 Aug 2014 04:05:06 -0700 (PDT) Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: <20140813111024.Horde.Hc-sr4Z-24Ie7jJkRN_21g1@webmail2.utc.fr> References: <53E9FCAB.6020207@free.fr> <1407846472710-4031026.post@n3.nabble.com> <20140813111024.Horde.Hc-sr4Z-24Ie7jJkRN_21g1@webmail2.utc.fr> Message-ID: <53EB4646.1030000@hslmg.de> Hello, My event_handler experiments with the Scilab help example in "Event handler functions" (see below) led to nothing. I can see the "event" at the bottom of the graphic window but I cannot arrest it in a variable. I tried this: function my_eventhandler(win,x,y,ibut) if ibut==-1000 then return,end [x,y]=xchange (x,y,'i2f') xinfo (msprintf ('Event code %d at mouse position is (%f,%f)',ibut,x,y)) endfunction plot2d () fig = gcf () ; fig.event_handler = 'my_eventhandler' ; fig.event_handler_enable = "on" ; //now: // - move the mouse over the graphic window // - press and release keys shifted or not with Ctrl pressed or not // - press button, wait a little release // - press and release button // - double-click button fig.event_handler_enable = "off" ; //suppress the event handler I fear I must retire to m=evstr(x_dialog(...) Jens ---------------------------------------------------------------------------- Am 13.08.2014 11:12, schrieb mottelet [via Scilab / Xcos - Mailing Lists Archives]: > > Hello, > > IMHO, the only way to trap a keypress and get the ascii (?) code is to > use the event_handler callback of a figure : > > function handler(x,y,ibut) > // > endfunction > > f=gcf(); > f.event_handler='handler'; > f.event_handle_enable='on'; > > On my computer, I have the following mapping > > left arrow pressed : ibut=37 (released=-37) > up arrow : 38 > right arrow 39 > down arrow 40 > > The problem is that you need to have a figure opened, and that this > figure must have the focus. > > S. > > Jens <[hidden email] > > a ?crit : > >> Hi Samuel, >> ASCII representation of up, down etc. would help me if I knew a Scilab >> command which puts the ascii value into a variable. input() is definitely >> unable to do so. >> >> Jens >> >> >> >> >> -- >> View this message in context: >> http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031026.html >> Sent from the Scilab users - Mailing Lists Archives mailing list >> archive at Nabble.com. >> _______________________________________________ >> users mailing list >> [hidden email] .> href="orghttp://lists.scilab.org/mailman/listinfo/users" >> target="_blank">orghttp://lists.scilab.org/mailman/listinfo/users >> > > > > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users > > > ------------------------------------------------------------------------ > If you reply to this email, your message will be added to the > discussion below: > http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031030.html > > To unsubscribe from [Scilab-users] Recognition of cursor key as input, > click here > . > NAML > > -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031031.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Wed Aug 13 13:39:46 2014 From: stephane.mottelet at utc.fr (stephane.mottelet at utc.fr) Date: Wed, 13 Aug 2014 13:39:46 +0200 Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: <53EB4646.1030000@hslmg.de> References: <53E9FCAB.6020207@free.fr> <1407846472710-4031026.post@n3.nabble.com> <20140813111024.Horde.Hc-sr4Z-24Ie7jJkRN_21g1@webmail2.utc.fr> <53EB4646.1030000@hslmg.de> Message-ID: <20140813133946.Horde.RQL3UGFLYN6_5rnwvgA0xw1@webmail2.utc.fr> Would this small example fit your needs ? function handler(win,x,y,ibut) ??? global _keypress ??? if or(ibut==(37:40)) ??????? _keypress=ibut; ??? end endfunction function key=waitforkeypress() ??? global _keypress ??? set(gcf(),'event_handler','handler','event_handler_enable','on') ??? _keypress=0; ??? while ~_keypress ??????? sleep(1) ??? end ??? set(gcf(),'event_handler_enable','off') ??? key=_keypress; endfunction while 1 ??? select waitforkeypress() ??? case 37 ??????? disp('left') ??? case 38 ??????? disp('up') ??? case 39 ??????? disp('right') ??? case 40 ??????? disp('down')??????? ??????? break ??? end end S. Jens a ?crit?: > Hello, > My event_handler experiments with the Scilab help example in "Event > handler functions" (see below) led to nothing.? I can see the "event" at > the bottom of the graphic window but I cannot arrest it in a variable. I > tried this: > > function my_eventhandler(win, x, y, ibut) if ibut==-1000 then > return,end [x,y]=xchange[1](x,y,'i2f') xinfo[2](msprintf[3]('Event > code %d at mouse position is (%f,%f)',ibut,x,y))endfunction > plot2d[4]()fig = gcf[5]() ;fig.event_handler = 'my_eventhandler' > ;fig.event_handler_enable = "on" ;//now:// - move the mouse over the > graphic window// - press and release keys shifted or not with Ctrl > pressed or not// - press button, wait a little release// - press > and release button// - double-click button fig.event_handler_enable = > "off" ; //suppress the event handler href="scilab://scilab.execexample/"> href="scilab://scilab.editexample/"> > > I fear I must retire to? > m=evstr(x_dialog(...) Jens > > ---------------------------------------------------------------------------- > > Am 13.08.2014 11:12, schrieb mottelet [via Scilab / Xcos - Mailing Lists > Archives]: > >> Hello, >> >> IMHO, the only way to trap a keypress and get the ascii (?) code is to >> use the event_handler callback of a figure : >> >> function handler(x,y,ibut) >> // >> endfunction >> >> f=gcf(); >> f.event_handler='handler'; >> ?f.event_handle_enable='on'; >> >> On my computer, I have the following mapping? >> >> left arrow pressed : ibut=37 (released=-37) >> up arrow : 38 >> right arrow 39 >> down arrow 40 >> >> The problem is that you need to have a figure opened, and that this >> figure must have the focus. >> >> S. >> >> Jens <[hidden email][6]> a ?crit?: >> >>> Hi Samuel, >>> ASCII representation of up, down etc. would help me if I knew a Scilab >>> command which puts the ascii value into a variable. input() is >>> definitely >>> unable to do so. >>> >>> Jens >>> >>> -- >>> View this message in context: >>> http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031026.html >>> Sent from the Scilab users - Mailing Lists Archives mailing list >>> archive at Nabble.com. >>> _______________________________________________ >>> users mailing list >>> [hidden email][7].>> href="orghttp://lists.scilab.org/mailman/listinfo/users" >>> target="_blank">orghttp://lists.scilab.org/mailman/listinfo/users >> >> >> ? >> >> _______________________________________________ >> users mailing list >> [hidden email][8] >> http://lists.scilab.org/mailman/listinfo/users >> >> ------------------------- >> If you reply to this email, your message will be added to the >> discussion below: >> http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031030.html >> To unsubscribe from [Scilab-users] Recognition of cursor key as >> input, click here[9]. >> NAML[10] > > > ? > > ------------------------- > > View this message in context: Re: Recognition of cursor key as input[11] > Sent from the Scilab users - Mailing Lists Archives mailing list > archive[12] at Nabble.com. Liens: ------ [1] xchange.html [2] xinfo.html [3] msprintf.html [4] plot2d.html [5] gcf.html [6] /user/SendEmail.jtp?type=node&node=4031030&i=0 [7] /user/SendEmail.jtp?type=node&node=4031030&i=1 [8] /user/SendEmail.jtp?type=node&node=4031030&i=2 [9] [10] http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml [11] http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031031.html [12] http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Wed Aug 13 14:12:37 2014 From: j.s.strom at hslmg.de (Jens) Date: Wed, 13 Aug 2014 05:12:37 -0700 (PDT) Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: <20140813133946.Horde.RQL3UGFLYN6_5rnwvgA0xw1@webmail2.utc.fr> References: <53E9FCAB.6020207@free.fr> <1407846472710-4031026.post@n3.nabble.com> <20140813111024.Horde.Hc-sr4Z-24Ie7jJkRN_21g1@webmail2.utc.fr> <53EB4646.1030000@hslmg.de> <20140813133946.Horde.RQL3UGFLYN6_5rnwvgA0xw1@webmail2.utc.fr> Message-ID: <53EB561A.20306@hslmg.de> This is small example's output: !--error 77 set: falsche Nummer von Eingangsargument(en): 2 nach 3 erwartet. at line 3 of function waitforkeypress called by : select waitforkeypress() at line 369 of exec file called by : [last line og script] exec('G:\Daten\ScilabFun\functionCheck.sce', -1) Jens ----------------------------------------------------------------------------------------------------------- Am 13.08.2014 13:41, schrieb mottelet [via Scilab / Xcos - Mailing Lists Archives]: > > Would this small example fit your needs ? > > function handler(win,x,y,ibut) > global _keypress > if or(ibut==(37:40)) > _keypress=ibut; > end > endfunction > > function key=waitforkeypress() > global _keypress > set(gcf(),'event_handler','handler','event_handler_enable','on') > _keypress=0; > while ~_keypress > sleep(1) > end > set(gcf(),'event_handler_enable','off') > key=_keypress; > endfunction > > while 1 > select waitforkeypress() > case 37 > disp('left') > case 38 > disp('up') > case 39 > disp('right') > case 40 > disp('down') > break > end > end > > S. > > Jens <[hidden email] > > a ?crit : > >> Hello, >> My event_handler experiments with the Scilab help example in "Event >> handler functions" (see below) led to nothing. I can see the "event" >> at the bottom of the graphic window but I cannot arrest it in a >> variable. I tried this: >> >> function my_eventhandler(win,x,y,ibut) >> if ibut==-1000 then return,end >> [x,y]=xchange (x,y,'i2f') >> xinfo (msprintf ('Event code %d at mouse position is (%f,%f)',ibut,x,y)) >> endfunction >> >> plot2d () >> fig = gcf () ; >> fig.event_handler = 'my_eventhandler' ; >> fig.event_handler_enable = "on" ; >> //now: >> // - move the mouse over the graphic window >> // - press and release keys shifted or not with Ctrl pressed or not >> // - press button, wait a little release >> // - press and release button >> // - double-click button >> >> fig.event_handler_enable = "off" ; //suppress the event handler >> > href="scilab://scilab.editexample/"> >> >> >> I fear I must retire to >> m=evstr(x_dialog(...) >> Jens >> >> >> >> ---------------------------------------------------------------------------- >> >> Am 13.08.2014 11:12, schrieb mottelet [via Scilab / Xcos - Mailing >> Lists Archives]: >>> >>> Hello, >>> >>> IMHO, the only way to trap a keypress and get the ascii (?) code is >>> to use the event_handler callback of a figure : >>> >>> function handler(x,y,ibut) >>> // >>> endfunction >>> >>> f=gcf(); >>> f.event_handler='handler'; >>> f.event_handle_enable='on'; >>> >>> On my computer, I have the following mapping >>> >>> left arrow pressed : ibut=37 (released=-37) >>> up arrow : 38 >>> right arrow 39 >>> down arrow 40 >>> >>> The problem is that you need to have a figure opened, and that this >>> figure must have the focus. >>> >>> S. >>> >>> Jens <[hidden email] >>> > a ?crit : >>> >>>> Hi Samuel, >>>> ASCII representation of up, down etc. would help me if I knew a Scilab >>>> command which puts the ascii value into a variable. input() is >>>> definitely >>>> unable to do so. >>>> >>>> Jens >>>> >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031026.html >>>> Sent from the Scilab users - Mailing Lists Archives mailing list >>>> archive at Nabble.com. >>>> _______________________________________________ >>>> users mailing list >>>> [hidden email] .>>> href="orghttp://lists.scilab.org/mailman/listinfo/users" >>>> target="_blank">orghttp://lists.scilab.org/mailman/listinfo/users >>>> >>> >>> >>> _______________________________________________ >>> users mailing list >>> [hidden email] >>> http://lists.scilab.org/mailman/listinfo/users >>> >>> >>> ------------------------------------------------------------------------ >>> If you reply to this email, your message will be added to the >>> discussion below: >>> http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031030.html >>> To unsubscribe from [Scilab-users] Recognition of cursor key as >>> input, click here. >>> NAML >>> >> >> >> ------------------------------------------------------------------------ >> >> View this message in context: Re: Recognition of cursor key as input >> >> Sent from the Scilab users - Mailing Lists Archives mailing list >> archive >> >> at Nabble.com. >> > > > > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users > > > ------------------------------------------------------------------------ > If you reply to this email, your message will be added to the > discussion below: > http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031032.html > > To unsubscribe from [Scilab-users] Recognition of cursor key as input, > click here > . > NAML > > -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031033.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Wed Aug 13 14:44:35 2014 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Wed, 13 Aug 2014 14:44:35 +0200 Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: <53EB561A.20306@hslmg.de> References: <53E9FCAB.6020207@free.fr> <1407846472710-4031026.post@n3.nabble.com> <20140813111024.Horde.Hc-sr4Z-24Ie7jJkRN_21g1@webmail2.utc.fr> <53EB4646.1030000@hslmg.de> <20140813133946.Horde.RQL3UGFLYN6_5rnwvgA0xw1@webmail2.utc.fr> <53EB561A.20306@hslmg.de> Message-ID: <53EB5DB3.1040002@utc.fr> Hello, I presume you are not using scilab 5.5.0, change the function as follows : function key=waitforkeypress() global _keypress set(gcf(),'event_handler','handler'); set(gcf(),'event_handler_enable','on') _keypress=0; while ~_keypress sleep(1) end set(gcf(),'event_handler_enable','off') key=_keypress; endfunction Le 13/08/2014 14:12, Jens a ?crit : > This is small example's output: > !--error 77 > set: falsche Nummer von Eingangsargument(en): 2 nach 3 erwartet. > at line 3 of function waitforkeypress called by : > select waitforkeypress() > at line 369 of exec file called by : [last line og script] > exec('G:\Daten\ScilabFun\functionCheck.sce', -1) > > Jens > ----------------------------------------------------------------------------------------------------------- > > > Am 13.08.2014 13:41, schrieb mottelet [via Scilab / Xcos - Mailing > Lists Archives]: >> >> Would this small example fit your needs ? >> >> function handler(win,x,y,ibut) >> global _keypress >> if or(ibut==(37:40)) >> _keypress=ibut; >> end >> endfunction >> >> function key=waitforkeypress() >> global _keypress >> set(gcf(),'event_handler','handler','event_handler_enable','on') >> _keypress=0; >> while ~_keypress >> sleep(1) >> end >> set(gcf(),'event_handler_enable','off') >> key=_keypress; >> endfunction >> >> while 1 >> select waitforkeypress() >> case 37 >> disp('left') >> case 38 >> disp('up') >> case 39 >> disp('right') >> case 40 >> disp('down') >> break >> end >> end >> >> S. >> >> Jens <[hidden email] >> > a ?crit : >> >>> Hello, >>> My event_handler experiments with the Scilab help example in "Event >>> handler functions" (see below) led to nothing. I can see the >>> "event" at the bottom of the graphic window but I cannot arrest it >>> in a variable. I tried this: >>> >>> function my_eventhandler(win,x,y,ibut) >>> if ibut==-1000 then return,end >>> [x,y]=xchange (x,y,'i2f') >>> xinfo (msprintf ('Event code %d at mouse position is (%f,%f)',ibut,x,y)) >>> endfunction >>> >>> plot2d () >>> fig = gcf () ; >>> fig.event_handler = 'my_eventhandler' ; >>> fig.event_handler_enable = "on" ; >>> //now: >>> // - move the mouse over the graphic window >>> // - press and release keys shifted or not with Ctrl pressed or not >>> // - press button, wait a little release >>> // - press and release button >>> // - double-click button >>> >>> fig.event_handler_enable = "off" ; //suppress the event handler >>> >> href="scilab://scilab.editexample/"> >>> >>> >>> I fear I must retire to >>> m=evstr(x_dialog(...) >>> Jens >>> >>> >>> >>> ---------------------------------------------------------------------------- >>> >>> Am 13.08.2014 11:12, schrieb mottelet [via Scilab / Xcos - Mailing >>> Lists Archives]: >>>> >>>> Hello, >>>> >>>> IMHO, the only way to trap a keypress and get the ascii (?) code is >>>> to use the event_handler callback of a figure : >>>> >>>> function handler(x,y,ibut) >>>> // >>>> endfunction >>>> >>>> f=gcf(); >>>> f.event_handler='handler'; >>>> f.event_handle_enable='on'; >>>> >>>> On my computer, I have the following mapping >>>> >>>> left arrow pressed : ibut=37 (released=-37) >>>> up arrow : 38 >>>> right arrow 39 >>>> down arrow 40 >>>> >>>> The problem is that you need to have a figure opened, and that this >>>> figure must have the focus. >>>> >>>> S. >>>> >>>> Jens <[hidden email] >>>> > a ?crit : >>>> >>>>> Hi Samuel, >>>>> ASCII representation of up, down etc. would help me if I knew a Scilab >>>>> command which puts the ascii value into a variable. input() is >>>>> definitely >>>>> unable to do so. >>>>> >>>>> Jens >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031026.html >>>>> Sent from the Scilab users - Mailing Lists Archives mailing list >>>>> archive at Nabble.com. >>>>> _______________________________________________ >>>>> users mailing list >>>>> [hidden email] .>>>> href="orghttp://lists.scilab.org/mailman/listinfo/users" >>>>> target="_blank">orghttp://lists.scilab.org/mailman/listinfo/users >>>>> >>>> >>>> >>>> _______________________________________________ >>>> users mailing list >>>> [hidden email] >>>> http://lists.scilab.org/mailman/listinfo/users >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> If you reply to this email, your message will be added to the >>>> discussion below: >>>> http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031030.html >>>> To unsubscribe from [Scilab-users] Recognition of cursor key as >>>> input, click here. >>>> NAML >>>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> View this message in context: Re: Recognition of cursor key as input >>> >>> Sent from the Scilab users - Mailing Lists Archives mailing list >>> archive >>> >>> at Nabble.com. >>> >> >> >> >> _______________________________________________ >> users mailing list >> [hidden email] >> http://lists.scilab.org/mailman/listinfo/users >> >> >> ------------------------------------------------------------------------ >> If you reply to this email, your message will be added to the >> discussion below: >> http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031032.html >> >> To unsubscribe from [Scilab-users] Recognition of cursor key as >> input, click here. >> NAML >> >> > > > ------------------------------------------------------------------------ > View this message in context: Re: Recognition of cursor key as input > > Sent from the Scilab users - Mailing Lists Archives mailing list > archive > > at Nabble.com. > > > _______________________________________________ > 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 Wed Aug 13 15:53:27 2014 From: j.s.strom at hslmg.de (Jens) Date: Wed, 13 Aug 2014 06:53:27 -0700 (PDT) Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: <53EB5DB3.1040002@utc.fr> References: <53E9FCAB.6020207@free.fr> <1407846472710-4031026.post@n3.nabble.com> <20140813111024.Horde.Hc-sr4Z-24Ie7jJkRN_21g1@webmail2.utc.fr> <53EB4646.1030000@hslmg.de> <20140813133946.Horde.RQL3UGFLYN6_5rnwvgA0xw1@webmail2.utc.fr> <53EB561A.20306@hslmg.de> <53EB5DB3.1040002@utc.fr> Message-ID: <53EB6DBB.4020002@hslmg.de> It works now on my installation, probably the way you designed it. In my case the graphic window does not open after starting the script by F5 or exec(...). And sometimes, when there /is/ a window accidently, after LMC into it, it responds properly to up, left, right and even down. Thanks ------------------------------------------------------------ Am 13.08.2014 14:45, schrieb mottelet [via Scilab / Xcos - Mailing Lists Archives]: > Hello, > > I presume you are not using scilab 5.5.0, change the function as follows : > > function key=waitforkeypress() > global _keypress > set(gcf(),'event_handler','handler'); > set(gcf(),'event_handler_enable','on') > _keypress=0; > while ~_keypress > sleep(1) > end > set(gcf(),'event_handler_enable','off') > key=_keypress; > endfunction -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031036.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Wed Aug 13 16:13:07 2014 From: stephane.mottelet at utc.fr (=?ISO-8859-1?Q?St=E9phane_Mottelet?=) Date: Wed, 13 Aug 2014 16:13:07 +0200 Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: <53EB6DBB.4020002@hslmg.de> References: <53E9FCAB.6020207@free.fr> <1407846472710-4031026.post@n3.nabble.com> <20140813111024.Horde.Hc-sr4Z-24Ie7jJkRN_21g1@webmail2.utc.fr> <53EB4646.1030000@hslmg.de> <20140813133946.Horde.RQL3UGFLYN6_5rnwvgA0xw1@webmail2.utc.fr> <53EB561A.20306@hslmg.de> <53EB5DB3.1040002@utc.fr> <53EB6DBB.4020002@hslmg.de> Message-ID: <53EB7273.3050806@utc.fr> Le 13/08/2014 15:53, Jens a ?crit : > It works now on my installation, probably the way you designed it. In > my case the graphic window does not open after starting the script by F5 really strange... I think that you mean that the windows, if already open (or minimized, or docked), does not show up ? > or exec(...). And sometimes, when there /is/ a window accidently, There should not be any "accident"... Your Scilab installation /seems///to be broken, as I had never heard of such a chaotic behaviour./ /S./ / > after LMC into it, it responds properly to up, left, right and even > down. Thanks > ------------------------------------------------------------ > > Am 13.08.2014 14:45, schrieb mottelet [via Scilab / Xcos - Mailing > Lists Archives]: >> Hello, >> >> I presume you are not using scilab 5.5.0, change the function as >> follows : >> >> function key=waitforkeypress() >> global _keypress >> set(gcf(),'event_handler','handler'); >> set(gcf(),'event_handler_enable','on') >> _keypress=0; >> while ~_keypress >> sleep(1) >> end >> set(gcf(),'event_handler_enable','off') >> key=_keypress; >> endfunction > > > ------------------------------------------------------------------------ > View this message in context: Re: Recognition of cursor key as input > > Sent from the Scilab users - Mailing Lists Archives mailing list > archive > > at Nabble.com. > > > _______________________________________________ > 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 Wed Aug 13 17:57:28 2014 From: j.s.strom at hslmg.de (Jens) Date: Wed, 13 Aug 2014 08:57:28 -0700 (PDT) Subject: [Scilab-users] Recognition of cursor key as input In-Reply-To: <53EB7273.3050806@utc.fr> References: <53E9FCAB.6020207@free.fr> <1407846472710-4031026.post@n3.nabble.com> <20140813111024.Horde.Hc-sr4Z-24Ie7jJkRN_21g1@webmail2.utc.fr> <53EB4646.1030000@hslmg.de> <20140813133946.Horde.RQL3UGFLYN6_5rnwvgA0xw1@webmail2.utc.fr> <53EB561A.20306@hslmg.de> <53EB5DB3.1040002@utc.fr> <53EB6DBB.4020002@hslmg.de> <53EB7273.3050806@utc.fr> Message-ID: <53EB8AC3.1050605@hslmg.de> After having taken the event handler route I love "messagebox", "x_dialog" or "x_choices". Especially in my application a graphic window would be unmotivated. There is no graphic to display. Jens -------------------------------------------------------------------- Am 13.08.2014 16:14, schrieb mottelet [via Scilab / Xcos - Mailing Lists Archives]: > Le 13/08/2014 15:53, Jens a ?crit : >> It works now on my installation, probably the way you designed it. In >> my case the graphic window does not open after starting the script by F5 > really strange... I think that you mean that the windows, if already > open (or minimized, or docked), does not show up ? /Correct/ > >> or exec(...). And sometimes, when there /is/ a window accidently, > There should not be any "accident"... Your Scilab installation > /seems///to be broken, as I had never heard of such a chaotic > behaviour./ Broken only in this context > > /S.// -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Recognition-of-cursor-key-as-input-tp4031013p4031038.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eduardo.torrecillas at gmail.com Wed Aug 13 19:08:28 2014 From: eduardo.torrecillas at gmail.com (Eduardo Torrecillas) Date: Wed, 13 Aug 2014 14:08:28 -0300 Subject: [Scilab-users] calling a fortran subroutine inside scilab Message-ID: Hi all, My question is about calling a fortran subroutine inside scilab. I have been doing this for quite some time now, using ilib_for_link, and it works neatly. Recently I have tried to use a subroutine that does parallel processing using openmp, but scilab just seems to ignore the compiling flag to parallelize calculations. I know the subroutine works because I have used it already, compiling the program into an executable and running it through a terminal. But on scilab, the subroutine runs as if no openmp directives had been called, even though I add the flag -fopenmp when calling ilib_for_link. Does anyone have an idea why this could be happening? I'll put some of my code below. I'm using linux ubuntu 12.04 32bits and scilab 5.3.3. I also tried using Ubuntu 12.04 64bits without success. ---------------------------------------------------------------------------------------------------------------------- function principal() clear clc ulink() stacksize(2.68e8) chdir('./Bibliotecas/Fortran/'); link_name = ['fteste_openmp','fteste_openmp2']; flag = "f"; files = ['tipos.mod','fteste_openmp.f90','fteste_openmp2.f90']; libs = []; ilib_for_link(link_name,files,libs,flag,'','floader.sce','','','','-fopenmp',''); exec floader.sce chdir('../') chdir('../') end n=100000 for i=1:n vec1(i,:)=[i 2*i 3*i] end tic() //serial processing [vec2]=call('fteste_openmp',npanel,1,'i',vec1,2,'d','out',[npanel,3],3,'d'); time=toc() mprintf('T: %f s\n',tempo) tic() //parallel processing [vec2]=call('fteste_openmp2',npanel,1,'i',vec1,2,'d','out',[npanel,3],3,'d'); time=toc() mprintf('T: %f s\n',tempo) endfunction ----------------------------------------------------------------------------------------------------------------- Thanks a lot, -- Eduardo Torrecillas AER-09 -------------- next part -------------- An HTML attachment was scrubbed... URL: From l_mineva at yahoo.de Wed Aug 13 09:38:45 2014 From: l_mineva at yahoo.de (lora mineva) Date: Wed, 13 Aug 2014 08:38:45 +0100 Subject: [Scilab-users] Plotting complex function Message-ID: <1407915525.36964.YahooMailNeo@web172703.mail.ir2.yahoo.com> Hello, i am new bei Scilab and i need a help. So?I'm trying to Plott dies complex Function:? y=2.8+(12/(1+(%i*0.27*(%e^(150/(x+2.5)))))); and i wrote dies small programm:? ? -->x=[0:10:140]; ? -->function [y]=f(x) -->y=2.8+(12/(1+(%i*0.27*(%e^(150/(x+2.5)))))); -->endfunction ? -->fplot2d(x,f) ? -->xtitle("PA12","e","T") So far, so good, but i plott only the real part and i can plott the?imaginary part from this function. Can you help me and tell?how does it work. Thak you! best regards Lora -------------- next part -------------- An HTML attachment was scrubbed... URL: From marko.marton at wigner.mta.hu Wed Aug 13 10:01:01 2014 From: marko.marton at wigner.mta.hu (=?ISO-8859-15?Q?M=E1rton_Mark=F3?=) Date: Wed, 13 Aug 2014 10:01:01 +0200 (CEST) Subject: [Scilab-users] Optimization question In-Reply-To: <1407892301423-4031028.post@n3.nabble.com> References: <1407892301423-4031028.post@n3.nabble.com> Message-ID: Dear Eduardo, Maybe a stupid question, but why do you want to optimize numerically a second order polinom? What's the problem with the analytical solution? Marci -- M?rton Mark? Wigner Research Centre for Physics Neutron Spectroscopy Department address: Budapest, Konkoly Th. M. str 29-33, H-1121, Hungary mail: Budapest, P.O. Box 49 H-1525 HUNGARY tel: +36/1-392 2222/1682 fax: +36/1-392 2501 email: marko at szfki.hu On Tue, 12 Aug 2014, ebmb.sci wrote: > Hello All, > please, could someone guide me on how to proceed to minimize the following > polynomial using functions optim and numdiff. Since the parameters A and B > have different constraints (i.e.: A = [0 1] and B = [1000 2000]), how must I > sign the values and pass them for optim? I implemented a basic script to try > to do it, but it always returns with wrong results. > > function f = myFc(x) > a = x(1); > b = x(2); > f = 0.000791 + 0.000027*a + -0.000037*b + 0.000180*a*b + -0.000126*a^2 + > -0.000162*b^2; > endfunction > > function [f, g, ind] = myFcCost(x, ind) > f = myFc(x); > g = numdiff(myFc, x); > endfunction > > x0 = [0 1]; > > [fopt, xopt] = optim(myFcCost, 'b', [0 1], [1000 2000], x0); > > I am so thanks for any help in advance! > > Best regards, > Eduardo. > > > > > -- > View this message in context: http://mailinglists.scilab.org/Optimization-question-tp4031028.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From ebmb.sci at gmail.com Wed Aug 13 14:39:20 2014 From: ebmb.sci at gmail.com (ebmb.sci) Date: Wed, 13 Aug 2014 05:39:20 -0700 (PDT) Subject: [Scilab-users] Optimization question In-Reply-To: <53EB1061.1040506@utc.fr> References: <1407892301423-4031028.post@n3.nabble.com> <53EB1061.1040506@utc.fr> Message-ID: <1407933560615-4031034.post@n3.nabble.com> Dear Mottelet, thanks a lot for your tip. It was very valuable for follow with my work. However, with the suggested modifications: x0 = [0.01 1001]; [fopt, xopt] = optim(myFcCost, 'b', [0 1000], [1 2000], x0); I always reaches the same results: xopt = 0 2000 fopt = -6.480732e+02 Please, could you help me again with this problem? Thanks in advance for your assistance! Best regards, Eduardo. -- View this message in context: http://mailinglists.scilab.org/Optimization-question-tp4031028p4031034.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From j.s.strom at hslmg.de Thu Aug 14 17:49:06 2014 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 14 Aug 2014 17:49:06 +0200 Subject: [Scilab-users] Plotting complex function In-Reply-To: <1407915525.36964.YahooMailNeo@web172703.mail.ir2.yahoo.com> References: <1407915525.36964.YahooMailNeo@web172703.mail.ir2.yahoo.com> Message-ID: <53ECDA72.4010101@hslmg.de> See identical problem in gomatlab forum. KG Am 13.08.2014 09:38, schrieb lora mineva: > Hello, > i am new bei Scilab and i need a help. So I'm trying to Plott dies > complex Function: > y=2.8+(12/(1+(%i*0.27*(%e^(150/(x+2.5)))))); > > and i wrote dies small programm: > -->x=[0:10:140]; > -->function [y]=f(x) > -->y=2.8+(12/(1+(%i*0.27*(%e^(150/(x+2.5)))))); > -->endfunction > -->fplot2d(x,f) > -->xtitle("PA12","e","T") > > So far, so good, but i plott only the real part and i can plott > the imaginary part from this function. Can you help me and tell how > does it work. Thak you! > > best regards > Lora > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From contact at pierre-vuillemin.fr Thu Aug 14 15:12:13 2014 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Thu, 14 Aug 2014 15:12:13 +0200 Subject: [Scilab-users] About the complex inverse tangent function Message-ID: <1408021933.2167.17.camel@Pelisse.lan> Hello, my question concerns the practical implementation of the complex inverse tangent function atan(z) in Scilab. In the source code of Scilab, the file "watan.f" (in the elementary functions) seems to compute this function as atan(z) = i/2 log((i+z)/(i-z)), where i^2=-1. Yet, when comparing the result given by atan(z) and %i/2*log((%i+z)/(% i-z)) in Scilab, they are different for every point on the imaginary axis excepted in the unit circle. For instance, z = 2*%i disp([atan(z),%i/2*log((%i+z)/(%i-z))]) -> 1.5707963 + 0.5493061i - 1.5707963 + 0.5493061i I would like to know where does the difference comes from and if 'watan.f' is really the file that computes atan. The values obtained with the function atan(z) seem to coincide with another definition of atan(z) : atan(z) = 1/(2i) [log(1+iz)-log(1-iz)] which is used by Mathematica and the function 'catan' in linux. Pierre From sgougeon at free.fr Thu Aug 14 19:46:58 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 14 Aug 2014 19:46:58 +0200 Subject: [Scilab-users] About the complex inverse tangent function In-Reply-To: <1408021933.2167.17.camel@Pelisse.lan> References: <1408021933.2167.17.camel@Pelisse.lan> Message-ID: <53ECF612.9070605@free.fr> Hello, Le 14/08/2014 15:12, Pierre Vuillemin a ?crit : > Hello, > > my question concerns the practical implementation of the complex inverse > tangent function atan(z) in Scilab. > > In the source code of Scilab, the file "watan.f" (in the elementary > functions) seems to compute this function as > > atan(z) = i/2 log((i+z)/(i-z)), > > where i^2=-1. > > Yet, when comparing the result given by atan(z) and %i/2*log((%i+z)/(% > i-z)) in Scilab, they are different for every point on the imaginary > axis excepted in the unit circle. For instance, > > z = 2*%i > disp([atan(z),%i/2*log((%i+z)/(%i-z))]) > > -> 1.5707963 + 0.5493061i - 1.5707963 + 0.5493061i With Scilab 5.5.0 on Windows 7 x64: -->z = 2*%i z = 2.i -->disp([atan(z),%i/2*log((%i+z)/(%i-z))]) 1.5707963 + 0.5493061i 1.5707963 + 0.5493061i This is a strange result for the log expression, since we could expect -1.57.. rather than 1.57... Indeed, with z = 2.i, we have: (i+z)/(i-z) = 3i/ -i = -3 = 3.i^2 => ln(3.i^2) = ln(3) + 2 ln(i) with i = exp(i.pi/2), so : .. = ln(3) + 2.i.pi/2 = ln(3) + i.pi Hence: i/2 * ln((i+z)/(i-z)) = i.ln(3)/2 - pi/2 : the real part is < 0. If there is an issue, it could be with log() rather than with atan(). ... > I would like to know where does the difference comes from and if > 'watan.f' is really the file that computes atan. > > The values obtained with the function atan(z) seem to coincide with > another definition of atan(z) : > > atan(z) = 1/(2i) [log(1+iz)-log(1-iz)] > > which is used by Mathematica and the function 'catan' in linux. 1/(2i) [log(1+iz)-log(1-iz)] = -i/2 log((1+iz)/(1-iz)) = -i/2 log(i(1+iz) / i(1-iz)) = -i/2 log((i-z)/(i+z)) = i/2 log((i+z)/(i-z)) So, both forms that you mention and that you compare to Scilab result are equivalent. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Aug 14 19:55:27 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 14 Aug 2014 19:55:27 +0200 Subject: [Scilab-users] About the complex inverse tangent function In-Reply-To: <53ECF612.9070605@free.fr> References: <1408021933.2167.17.camel@Pelisse.lan> <53ECF612.9070605@free.fr> Message-ID: <53ECF80F.8060300@free.fr> Le 14/08/2014 19:46, Samuel Gougeon a ?crit : > -->disp([atan(z),%i/2*log((%i+z)/(%i-z))]) > > 1.5707963 + 0.5493061i 1.5707963 + 0.5493061i > > This is a strange result for the log expression, since we could expect > -1.57.. rather than 1.57... > Indeed, with z = 2.i, we have: (i+z)/(i-z) = 3i/ -i = -3 = 3.i^2 => > ln(3.i^2) = ln(3) + 2 ln(i) > with i = exp(i.pi/2), so : .. = ln(3) + 2.i.pi/2 = ln(3) + i.pi > Hence: i/2 * ln((i+z)/(i-z)) = i.ln(3)/2 - pi/2 : the real part is < 0. > If there is an issue, it could be with log() rather than with atan(). Actually, we have -3 = 3.exp(i.pi) but also = 3.exp(-i.pi), leading to ln(3) - i.pi .. and so i.ln(3)/2 + pi/2 : The real part is here modulo pi (due to the i/2 factor) ; so the Scilab output is correct for the log. -------------- next part -------------- An HTML attachment was scrubbed... URL: From contact at pierre-vuillemin.fr Fri Aug 15 10:52:39 2014 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Fri, 15 Aug 2014 10:52:39 +0200 Subject: [Scilab-users] About the complex inverse tangent function In-Reply-To: <53ECF612.9070605@free.fr> References: <1408021933.2167.17.camel@Pelisse.lan> <53ECF612.9070605@free.fr> Message-ID: <1408092759.2112.18.camel@Pelisse.lan> Le jeudi 14 ao?t 2014 ? 19:46 +0200, Samuel Gougeon a ?crit : > Hello, > > Le 14/08/2014 15:12, Pierre Vuillemin a ?crit : > > > Hello, > > > > my question concerns the practical implementation of the complex inverse > > tangent function atan(z) in Scilab. > > > > In the source code of Scilab, the file "watan.f" (in the elementary > > functions) seems to compute this function as > > > > atan(z) = i/2 log((i+z)/(i-z)), > > > > where i^2=-1. > > > > Yet, when comparing the result given by atan(z) and %i/2*log((%i+z)/(% > > i-z)) in Scilab, they are different for every point on the imaginary > > axis excepted in the unit circle. For instance, > > > > z = 2*%i > > disp([atan(z),%i/2*log((%i+z)/(%i-z))]) > > > > -> 1.5707963 + 0.5493061i - 1.5707963 + 0.5493061i > With Scilab 5.5.0 on Windows 7 x64: > -->z = 2*%i > z = > 2.i > -->disp([atan(z),%i/2*log((%i+z)/(%i-z))]) > > 1.5707963 + 0.5493061i 1.5707963 + 0.5493061i > I am on a 64-bit linux environment (Debian Jessie, Scilab 5.5.0), the result would be OS-dependent? > This is a strange result for the log expression, since we could expect > -1.57.. rather than 1.57... > Indeed, with z = 2.i, we have: (i+z)/(i-z) = 3i/ -i = -3 = 3.i^2 => > ln(3.i^2) = ln(3) + 2 ln(i) > with i = exp(i.pi/2), so : .. = ln(3) + 2.i.pi/2 = ln(3) + i.pi > Hence: i/2 * ln((i+z)/(i-z)) = i.ln(3)/2 - pi/2 : the real part is < > 0. > If there is an issue, it could be with log() rather than with atan(). > ... > > I would like to know where does the difference comes from and if > > 'watan.f' is really the file that computes atan. > > > > The values obtained with the function atan(z) seem to coincide with > > another definition of atan(z) : > > > > atan(z) = 1/(2i) [log(1+iz)-log(1-iz)] > > > > which is used by Mathematica and the function 'catan' in linux. > 1/(2i) [log(1+iz)-log(1-iz)] > = -i/2 log((1+iz)/(1-iz)) > = -i/2 log(i(1+iz) / i(1-iz)) > = -i/2 log((i-z)/(i+z)) > = i/2 log((i+z)/(i-z)) > So, both forms that you mention and that you compare to Scilab result are equivalent. > > HTH > Samuel > The relation log(ab) = log(a) + log(b) only stands for the multi-valued logarithm function (or modulo pi). With the principal value of the log, defined as log(z) = ln(|z|) + i * arg(z) where -pi _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Fri Aug 15 11:28:35 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 15 Aug 2014 11:28:35 +0200 Subject: [Scilab-users] About the complex inverse tangent function In-Reply-To: <1408092759.2112.18.camel@Pelisse.lan> References: <1408021933.2167.17.camel@Pelisse.lan> <53ECF612.9070605@free.fr> <1408092759.2112.18.camel@Pelisse.lan> Message-ID: <53EDD2C3.2050008@free.fr> Hello Pierre, Le 15/08/2014 10:52, Pierre Vuillemin a ?crit : > Le jeudi 14 ao?t 2014 ? 19:46 +0200, Samuel Gougeon a ?crit : >> With Scilab 5.5.0 on Windows 7 x64: >> -->z = 2*%i >> z = >> 2.i >> -->disp([atan(z),%i/2*log((%i+z)/(%i-z))]) >> >> 1.5707963 + 0.5493061i 1.5707963 + 0.5493061i > I am on a 64-bit linux environment (Debian Jessie, Scilab 5.5.0), the > result would be OS-dependent? It is possible. Some packages or/and some single functions -- including maths ones -- depend on the OS. > The relation > > log(ab) = log(a) + log(b) > > only stands for the multi-valued logarithm function (or modulo pi). With > the principal value of the log, defined as > > log(z) = ln(|z|) + i * arg(z) > > where -pi this is not true as soon as -pi pi. In particular, it is not true on the branch cut (- inf, 0]. > For instance, > > log(-1) = j pi > > log(-1)+log(-1) = 2j pi != log(1) = 0 It is, modulo 2.pi : i.2.pi [2.pi] ~ i.0 = 0 > This is merely a problem of convention in the definitions, but this > leads to differences in the value of the atan on its branch cuts. Indeed. Both results that you get from atan and log on Linux are correct, and equivalent. Results from win7 are equal and agree with the standard interval (-pi, pi]. Samuel From contact at pierre-vuillemin.fr Fri Aug 15 14:26:30 2014 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Fri, 15 Aug 2014 14:26:30 +0200 Subject: [Scilab-users] About the complex inverse tangent function In-Reply-To: <53EDD2C3.2050008@free.fr> References: <1408021933.2167.17.camel@Pelisse.lan> <53ECF612.9070605@free.fr> <1408092759.2112.18.camel@Pelisse.lan> <53EDD2C3.2050008@free.fr> Message-ID: <1408105590.4284.38.camel@Pelisse.lan> Le vendredi 15 ao?t 2014 ? 11:28 +0200, Samuel Gougeon a ?crit : > Hello Pierre, > > Le 15/08/2014 10:52, Pierre Vuillemin a ?crit : > > Le jeudi 14 ao?t 2014 ? 19:46 +0200, Samuel Gougeon a ?crit : > >> With Scilab 5.5.0 on Windows 7 x64: > >> -->z = 2*%i > >> z = > >> 2.i > >> -->disp([atan(z),%i/2*log((%i+z)/(%i-z))]) > >> > >> 1.5707963 + 0.5493061i 1.5707963 + 0.5493061i > > I am on a 64-bit linux environment (Debian Jessie, Scilab 5.5.0), the > > result would be OS-dependent? > It is possible. Some packages or/and some single functions -- including > maths ones -- depend on the OS. > > The relation > > > > log(ab) = log(a) + log(b) > > > > only stands for the multi-valued logarithm function (or modulo pi). With > > the principal value of the log, defined as > > > > log(z) = ln(|z|) + i * arg(z) > > > > where -pi Is this interval conventionnaly standard for the principal value, rather > than -pi <= arg(z) < pi ? I have considered the same definitions as in (Section 4.1.2) Handbook of Mathematical Functions: With Formulas, Graphs, and Mathematical tables Milton Abramowitz,Irene A. Stegun or Branch Cuts for Complex Elementary Functions or Much Ado About Nothing's Sign Bit W. Kahan The same domain for the principal value is used by Wolfram, http://mathworld.wolfram.com/ComplexArgument.html by Matlab, http://www.mathworks.fr/fr/help/symbolic/mupad_ref/arg.html and seems to be used by Scilab as well https://help.scilab.org/docs/5.5.0/en_US/atan.html > > this is not true as soon as -pi > pi. In particular, it is not true on the branch cut (- inf, 0]. > > For instance, > > > > log(-1) = j pi > > > > log(-1)+log(-1) = 2j pi != log(1) = 0 > It is, modulo 2.pi : i.2.pi [2.pi] ~ i.0 = 0 The relation is also violated for any complex in the upper left half plane, thus the modulo operation is not very well suited here. Something less ambiguous seems to use the "unwinding number" : The unwinding Number (R.M. Corless and D.J. Jeffrey) : http://www.apmaths.uwo.ca/~djeffrey/Offprints/editors.pdf which basically consists in adding 2Ki pi whenever required to make standard relations work everywhere in the complex plane. > > This is merely a problem of convention in the definitions, but this > > leads to differences in the value of the atan on its branch cuts. > Indeed. Both results that you get from atan and log on Linux are > correct, and equivalent. > Results from win7 are equal and agree with the standard interval (-pi, pi]. > > Samuel > I perfectly understand that each definition is equivalent "up to 2K i pi", yet from a numerical point of view, it seems to me that they cannot be considered as equivalent. But the thing that really intrigues me is why the built-in function of atan in Scilab does not lead to the same result (in the exact sense) as the formulation in the commentary of the code 'watan.f'. I will try to determine what is really called by Scilab. The OS atan would correspond. Thank you for your answers. :) Pierre > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From samuel.enibe at unn.edu.ng Sat Aug 16 15:00:00 2014 From: samuel.enibe at unn.edu.ng (samuel.enibe at unn.edu.ng) Date: Sat, 16 Aug 2014 14:00:00 +0100 Subject: [Scilab-users] Use of automatic function without one or specification tests Message-ID: I would like to use the automatic function in the Grocer SCILAB package to eliminate some non significant variables in a linear regression problem. The function ols runs successfully on the data. In contrast, the function automatic runs partially, suggesting that it should be run without the specification tests. Is there any way to eliminate one or more of the specification tests? The user manual is not clear on this. Your suggestions will be highly appropriated. Samuel Enibe From paul.carrico at free.fr Sun Aug 17 12:55:47 2014 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Sun, 17 Aug 2014 12:55:47 +0200 (CEST) Subject: [Scilab-users] Real time acquisition in Scilab Message-ID: <1645283740.28474984.1408272947024.JavaMail.root@zimbra5-e1.priv.proxad.net> Dear All, I'm a complete beginner in such item and I think it has ever been implemented in Scilab : what module can handle real time (signal) plotting ? (google searches has been unsuccessfull using such words or close ones) Thanks Paul From akhorshidi at live.com Sun Aug 17 20:28:24 2014 From: akhorshidi at live.com (A Khorshidi) Date: Sun, 17 Aug 2014 11:28:24 -0700 (PDT) Subject: [Scilab-users] Real time acquisition in Scilab In-Reply-To: <1645283740.28474984.1408272947024.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1645283740.28474984.1408272947024.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1408300104194-4031053.post@n3.nabble.com> Hi; First about data acquisition,.. It depends on what type of i/o device you intend to choose and which communication interfaces you wanna use. So, all you need which can find in the following links: https://atoms.scilab.org/categories/instruments_control and http://hart.sourceforge.net/ Also there are some other tools which have developed based on Scilab and Scicoslab , but due to this reason that they are not opensource I?m not keen on referring to them. ;) But about real-time plotting,.. Attached you will find a sample function which can be used to plot the data acquired in real-time. To read characters from the serial buffer this function use ?serialport? toolbox. HTH, Mehran _ Paul Carrico wrote > Dear All, > > I'm a complete beginner in such item and I think it has ever been > implemented in Scilab : what module can handle real time (signal) plotting > ? > (google searches has been unsuccessfull using such words or close ones) > > Thanks > > Paul > _______________________________________________ > users mailing list > users at .scilab > http://lists.scilab.org/mailman/listinfo/users rtPlot.zip -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Real-time-acquisition-in-Scilab-tp4031052p4031053.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From samuel.enibe at unn.edu.ng Mon Aug 18 00:01:58 2014 From: samuel.enibe at unn.edu.ng (Samuel Enibe) Date: Sun, 17 Aug 2014 23:01:58 +0100 Subject: [Scilab-users] Use of automatic function without one or more specification tests Message-ID: I would like to use the *automatic* function in the Grocer SCILAB package to eliminate some non significant variables in a linear regression problem. The function *ols* runs successfully on the data. In contrast, the function *automatic* runs partially, suggesting that it should be run without the specification tests. Is there any way to eliminate one or more of the specification tests? The user manual is not clear on this. Your suggestions will be highly appropriated. Samuel Enibe University of Nigeria, Nsukka -------------- next part -------------- An HTML attachment was scrubbed... URL: From xzf16 at 163.com Mon Aug 18 04:15:18 2014 From: xzf16 at 163.com (=?GBK?B?0OzVvw==?=) Date: Mon, 18 Aug 2014 10:15:18 +0800 (CST) Subject: [Scilab-users] A question about plotting Message-ID: <4f34f6aa.a2fe.147e6e5b02a.Coremail.xzf16@163.com> Hi , All: I have a question about plotting. I want to plot 2 lines in a graphic , so I type the command as below: -->x=linspace(0,2*%pi,40); -->y1=sin(x) -->y2=cos(x); -->X=[x,x]; -->Y=[y1,y2]; Then , I type the plot command : -->plot(x,y1,x,y2); The result is shown as below: But when I type a command as below: -->plot(X,Y); The result is : It has an additional line. Why will this line appear? Thanks for your reply. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 13383 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 11917 bytes Desc: not available URL: From ebmb.sci at gmail.com Thu Aug 14 13:45:02 2014 From: ebmb.sci at gmail.com (ebmb.sci) Date: Thu, 14 Aug 2014 04:45:02 -0700 (PDT) Subject: [Scilab-users] Optimization question In-Reply-To: References: <1407892301423-4031028.post@n3.nabble.com> Message-ID: <1408016702829-4031042.post@n3.nabble.com> Dear M?rton, I am using these functions to identify the points A and B that minimizes (or sometimes maximizes) this problem. Hence, I thought the optim could be the best solution to do this, since I must explore the search space. However, as said previously, using the intervals [0 1000] and [1 2000] I always get the same results. Please, do you have any suggestions to help me? Thank you so much for your attention! Best regards, Eduardo. -- View this message in context: http://mailinglists.scilab.org/Optimization-question-tp4031028p4031042.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From gcinumuzi at live.co.za Sat Aug 16 16:33:46 2014 From: gcinumuzi at live.co.za (Gcinumuzi Ngwenya) Date: Sat, 16 Aug 2014 16:33:46 +0200 Subject: [Scilab-users] Scilab Message-ID: Good Afternoon ladies and gentlemen My name is Gcinumuzi Ngwenya from South Africa. I am doing my BTech in Chemical Engineering and right now we have been introduced to Scilab but I am really struggling at the moment. Can you guys please help me with this two questions? 1. I have been plotting a transfer function graph on scilab and I see that on the x-axis it starts at 1 and end up on the value which I entered for final integration time, what informs scilab or the graph to start at 1, or what is the reason for it to start at 1? I got this graph when I was doing an example for the beginners on scilab website 2. what is meant by buffer size on the simulation/setup menu ? 3. is there a document that can explain to me the function of each palette on xcos? Thanking you in advance for your assistance Best Regards Gcinumuzi -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom_engay at yahoo.com Sun Aug 17 05:59:06 2014 From: tom_engay at yahoo.com (Einstom Engay) Date: Sun, 17 Aug 2014 11:59:06 +0800 Subject: [Scilab-users] Plot error Message-ID: <1408247946.438.YahooMailNeo@web190901.mail.sg3.yahoo.com> Hi, I have previously used the function plot and it worked well. But, every time i used it now it outputs the error 21.? -->x = [-5:5] ?x ?= ? ? - 5. ?- 4. ?- 3. ?- 2. ?- 1. ? ?0. ? ?1. ? ?2. ? ?3. ? ?4. ? ?5. ? ? -->plot(x) ?!--error 21? Invalid index. at line ? ? ?14 of function %h_e called by : ? at line ? ? ?15 of function _update_shaded_plots called by : ? at line ? ? ?91 of function _compute_data_bounds called by : ? at line ? ? 327 of function _mainPlot called by : ? at line ? ? ?28 of function plot called by : ? plot(x) ? I am a windows 7 user. Please help me fix this. Thanks a lot, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom_engay at yahoo.com Sun Aug 17 06:09:14 2014 From: tom_engay at yahoo.com (tom) Date: Sat, 16 Aug 2014 21:09:14 -0700 (PDT) Subject: [Scilab-users] Plot Error 21 Message-ID: <1408248554079-4031051.post@n3.nabble.com> Hi, I have previously used the function plot and it worked well. But, every time i use it now it outputs error 21. -->x = [-5:5] x = - 5. - 4. - 3. - 2. - 1. 0. 1. 2. 3. 4. 5. -->plot(x) !--error 21 Invalid index. at line 14 of function %h_e called by : at line 15 of function _update_shaded_plots called by : at line 91 of function _compute_data_bounds called by : at line 327 of function _mainPlot called by : at line 28 of function plot called by : plot(x) I am a windows 7 user. Please help me fix this. Thanks a lot, Tom -- View this message in context: http://mailinglists.scilab.org/Plot-Error-21-tp4031051.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From paul.bignier at scilab-enterprises.com Mon Aug 18 08:53:03 2014 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Mon, 18 Aug 2014 08:53:03 +0200 Subject: [Scilab-users] A question about plotting In-Reply-To: <4f34f6aa.a2fe.147e6e5b02a.Coremail.xzf16@163.com> References: <4f34f6aa.a2fe.147e6e5b02a.Coremail.xzf16@163.com> Message-ID: <53F1A2CF.8000205@scilab-enterprises.com> Hello, When you type ' plot(X,Y) ', Scilab links together the consecutive [X(i),Y(i)] pairs. In your example, X(40)~6.28 and X(41)=0. So [X(40), Y(40)] is connected to [X(41), Y(41)], and the "additional line" represents that simple connection. ' plot(x,y1,x,y2); ' considers [x, y1] and [x, y2] as two distinct curves, so they are not linked together. Hope this helps, Regards, Paul On 08/18/2014 04:15 AM, ?? wrote: > > Hi , All: > > I have a question about plotting. > > I want to plot 2 lines in a graphic , so I type the command as below: > > -->x=linspace(0,2*%pi,40); > > -->y1=sin(x) > > -->y2=cos(x); > > -->X=[x,x]; > > -->Y=[y1,y2]; > > Then , I type the plot command : > > -->plot(x,y1,x,y2); > > The result is shown as below: > > Graphic window number 0 (2).bmp > > But when I type a command as below: > > -->plot(X,Y); > > The result is : > > Graphic window number 0.bmp > > It has an additional line. > > Why will this line appear? > > Thanks for your reply. > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.69 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 13383 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 11917 bytes Desc: not available URL: From sgougeon at free.fr Mon Aug 18 11:12:37 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 18 Aug 2014 11:12:37 +0200 Subject: [Scilab-users] Plot error In-Reply-To: <1408247946.438.YahooMailNeo@web190901.mail.sg3.yahoo.com> References: <1408247946.438.YahooMailNeo@web190901.mail.sg3.yahoo.com> Message-ID: <53F1C385.5030906@free.fr> Hello, Le 17/08/2014 05:59, Einstom Engay a ?crit : > Hi, > > I have previously used the function plot and it worked well. But, > every time i used it now it outputs the error 21. > > -->x = [-5:5] > x = > - 5. - 4. - 3. - 2. - 1. 0. 1. 2. 3. 4. 5. > -->plot(x) > !--error 21 > Invalid index. > at line 14 of function %h_e called by : > at line 15 of function _update_shaded_plots called by : > at line 91 of function _compute_data_bounds called by : > at line 327 of function _mainPlot called by : > at line 28 of function plot called by : > plot(x) It works for me, also with Windows7. You might do: clear plot and then try again. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From grocer.toolbox at gmail.com Mon Aug 18 11:17:33 2014 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Mon, 18 Aug 2014 11:17:33 +0200 Subject: [Scilab-users] Use of automatic function without one or more specification tests In-Reply-To: References: Message-ID: Hello Samuel I don not know what you mean by "the function *automatic *runs partially", but anyway, you can choose your specification tests with the option 'test=....' as shown in example 2 of the help file for automatic. If you want to use only the Doornik-Hansen normality test, then run (shown with the example of the help file): --> global GROCERDIR --> load(GROCERDIR+'/data/bdhenderic.dat') ; --> results=automatic('delts(lm1-lp)','lagts(lm1-lp-ly)','delts(lp)','rnet','delts(lagts(lm1-lp))', 'delts(lagts(2,lm1-lp))','delts(lagts(3,lm1-lp))','delts(lagts(4,lm1-lp))',... 'delts(ly)','delts(lagts(1,ly))', 'delts(lagts(2,ly))','delts(lagts(3,ly))','delts(lagts(4,ly))',... 'delts(delts(lp))','delts(delts(lagts(1,lp)))','delts(delts(lagts(2,lp)))','delts(delts(lagts(3,lp)))','delts(delts(lagts(4,lp)))',... 'delts(rnet)','delts(lagts(1,rnet))','delts(lagts(2,rnet))','delts(lagts(3,rnet))','delts(lagts(4,rnet))','const',... 'test=doornhans') Alternativley if you want to obtain the display specification test, but without them constarining the estimation, tou can impose a 0 p-value for these tests with option 'eta=0': --> results=automatic('delts(lm1-lp)','lagts(lm1-lp-ly)','delts(lp)','rnet','delts(lagts(lm1-lp))', 'delts(lagts(2,lm1-lp))','delts(lagts(3,lm1-lp))','delts(lagts(4,lm1-lp))',... 'delts(ly)','delts(lagts(1,ly))', 'delts(lagts(2,ly))','delts(lagts(3,ly))','delts(lagts(4,ly))',... 'delts(delts(lp))','delts(delts(lagts(1,lp)))','delts(delts(lagts(2,lp)))','delts(delts(lagts(3,lp)))','delts(delts(lagts(4,lp)))',... 'delts(rnet)','delts(lagts(1,rnet))','delts(lagts(2,rnet))','delts(lagts(3,rnet))','delts(lagts(4,rnet))','const',... 'eta=0') ?ric. 2014-08-18 0:01 GMT+02:00 Samuel Enibe : > I would like to use the *automatic* function in the Grocer SCILAB package > to eliminate some non significant variables in a linear regression problem. > The function *ols* runs successfully on the data. In contrast, the > function *automatic* runs partially, suggesting that it should be run > without the specification tests. Is there any way to eliminate one or more > of the specification tests? > The user manual is not clear on this. > Your suggestions will be highly appropriated. > > Samuel Enibe > University of Nigeria, Nsukka > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Aug 18 11:20:44 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 18 Aug 2014 11:20:44 +0200 Subject: [Scilab-users] A question about plotting In-Reply-To: <4f34f6aa.a2fe.147e6e5b02a.Coremail.xzf16@163.com> References: <4f34f6aa.a2fe.147e6e5b02a.Coremail.xzf16@163.com> Message-ID: <53F1C56C.7050801@free.fr> Hello, Your same questions posted on 2014-08-02 were answered two days latter, here: http://mailinglists.scilab.org/Scilab-users-A-question-about-plotting-tp4031000p4031001.html Samuel Le 18/08/2014 04:15, ?? a ?crit : > > Hi , All: > > I have a question about plotting. > > I want to plot 2 lines in a graphic , so I type the command as below: > > -->x=linspace(0,2*%pi,40); > > -->y1=sin(x) > > -->y2=cos(x); > > -->X=[x,x]; > > -->Y=[y1,y2]; > > Then , I type the plot command : > > -->plot(x,y1,x,y2); > > The result is shown as below: > > Graphic window number 0 (2).bmp > > But when I type a command as below: > > -->plot(X,Y); > > The result is : > > Graphic window number 0.bmp > > It has an additional line. > > Why will this line appear? > > Thanks for your reply. > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 13383 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 11917 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Tue Aug 19 01:33:55 2014 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 19 Aug 2014 00:33:55 +0100 Subject: [Scilab-users] Scilab 5.5 filled curve plotting issue? Message-ID: Hello, The attached simple Scilab script and data plots quite similar data as filled curves in Scilab 5.5 (Win 7) with quite different results: (PS: one dataset was shifted by 3 units along y-axis for display purposes only; the problem is the same if no constant is added) Any ideas of what can be causing the completely different behaviour of plot2d / polyline_style = 5? Thanks and regards, Rafael G. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 8929 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Scliab_filled_curve_plotting_issue.zip Type: application/x-zip-compressed Size: 1464 bytes Desc: not available URL: From sravanaitha009 at gmail.com Mon Aug 18 13:23:55 2014 From: sravanaitha009 at gmail.com (sravanaitha009) Date: Mon, 18 Aug 2014 04:23:55 -0700 (PDT) Subject: [Scilab-users] Reg: Reading an s2p file Message-ID: Hello, I have an s2p file with s parameters. Here my task is to write a script about reading the s2p file. So please could you guide me in writing a program about reading an s2p file. Thanks, Reagds, Sravan -- View this message in context: http://mailinglists.scilab.org/Reg-Reading-an-s2p-file-tp4031062.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Aug 19 09:40:27 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 19 Aug 2014 09:40:27 +0200 Subject: [Scilab-users] Scilab 5.5 filled curve plotting issue? In-Reply-To: References: Message-ID: <53F2FF6B.4090905@free.fr> Hello Rafael, Le 19/08/2014 01:33, Rafael Guerra a ?crit : > > Hello, > > The attached simple Scilab script and data plots quite similar data as > filled curves in Scilab 5.5 (Win 7) with quite different results: > This is a known bug reported 2 years ago in http://bugzilla.scilab.org/show_bug.cgi?id=11632 > Any ideas of what can be causing the completely different behaviour of > plot2d / polyline_style = 5? > Please see comments #2 and #3 of the report. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From giri at leos.gov.in Tue Aug 19 11:15:32 2014 From: giri at leos.gov.in (Giri) Date: Tue, 19 Aug 2014 14:45:32 +0530 Subject: [Scilab-users] Reg: Reading an s2p file In-Reply-To: References: Message-ID: <9088e4ad64cf32b50d909fe8e542b447@mail.leos.dos.gov.in> On 2014-08-18 16:53, sravanaitha009 wrote: > Hello, > > I have an s2p file with s parameters. Here my task is to write a script about reading the s2p file. So please could you guide me in writing a program about reading an s2p file. > > Thanks, > > Reagds, > Sravan > > ------------------------- > View this message in context: Reg: Reading an s2p file [2] > Sent from the Scilab users - Mailing Lists Archives mailing list archive [3] at Nabble.com. > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users [1] Hello Sravan: Please find below Scilab code to directly read and plot S2p files saved from an Agilent PNA. Do let me know if it works for you. Sincerely, Giri // plotting 2 d VNA data and caclulated data. // Plotting Insertion Loss, Isolation and Return Loss on different y axes with common x axis. // works only in scilab 5.1 and above clear; clf; //Prompting user for input file name of first file unix_w('dir *.s2p'); fname=input("What is the file name 1(OFF state?)","string"); fid=mopen(fname,'r'); // use niter=-1 to read up to the end of file // Exracting the file name without extension .s2p dot_pos=strindex(fname,'.'); fname_tit=part(fname,1:dot_pos-1); header=mfscanf(1,fid,'%s'); while ~(header=="50") header=mfscanf(1,fid,'%s'); end indata1=mfscanf(-1,fid,'%f %f %f %f %f %f %f %f %f'); freq_meas=indata1(:,1); freq_meas=freq_meas./1e9; s11_1_real=indata1(:,2); s11_1_imag=indata1(:,3); s12_1_real=indata1(:,4); s12_1_imag=indata1(:,5); s21_1_real=indata1(:,6); s21_1_imag=indata1(:,7); s22_1_real=indata1(:,8); s22_1_imag=indata1(:,9); fname=input("What is the file name 2 (ON STATE)?","string"); fid=mopen(fname,'r'); // use niter=-1 to read up to the end of file // Exracting the file name without extension .s2p dot_pos=strindex(fname,'.'); fname_tit=part(fname,1:dot_pos-1); header=mfscanf(1,fid,'%s'); while ~(header=="50") header=mfscanf(1,fid,'%s'); end indata2=mfscanf(-1,fid,'%f %f %f %f %f %f %f %f %f'); // indata=mfscanf(-1,fid,'%f %f'); freq_meas=indata2(:,1); freq_meas=freq_meas./1e9; s11_2_real=indata2(:,2); s11_2_imag=indata2(:,3); s12_2_real=indata2(:,4); s12_2_imag=indata2(:,5); s21_2_real=indata2(:,6); s21_2_imag=indata2(:,7); s22_2_real=indata2(:,8); s22_2_imag=indata2(:,9); //preparing data for output datafile iso=s12_1_real; il=s12_2_real; rl=s11_2_real; // Plotting IL, RL and ISO in the same plot //*********** Added in Version 13 ************ scf(2); plot2d(freq_meas,[rl iso],rect=[0.5,-40,11,0]); xtitle("",["Frequency(GHz)"],["Return Loss/ Isolation (dB)"]); xgrid(); a=gca(); poly1_1=a.children(1); poly1=poly1_1.children(1); poly1.thickness=2; poly1.foreground=2; //poly2=poly1_1.children(2); //poly2.thickness=2; //poly2.foreground=1; xset("font size",4); a=newaxes(); a.filled="off"; plot2d(freq_meas,il,axesflag=3,rect=[0.5,-1.0,11,0]); a.axes_visible=["off","on","off"]; xtitle(fname_tit,[("")],["Insertion Loss (dB)"]); xset("font size",4); // xgrid(); // Setting polyline properties for plot a=gca(); poly1_1=a.children(1); poly1=poly1_1.children(1); poly1.thickness=2; poly1.foreground=5; // Saving the figure in .scg format // Attaching the .scg extension to file name name_str=[fname_tit,".scg"]; fname_out=strcat(name_str); save(fname_out,gcf()); // op_fname=[fname_tit,".dat"]; op_fname=[fname_tit,".dat"]; op_fname=strcat(op_fname); fid_opfile=mopen(op_fname,'w'); for i=1:length(freq_meas) mfprintf(fid_opfile,'%f %f %f %f n',freq_meas(i),iso(i),il(i),rl(i)); end // mfprintf(fid_opfile,'%f',indata1); mclose('all'); // plotting 2 d VNA data and caclulated data. // Plotting Insertion Loss, Isolation and Return Loss on different y axes with common x axis. // works only in scilab 5.1 and above clear; clf; //Prompting user for input file name of first file unix_w('dir *.s2p'); fname=input("What is the file name 1(OFF state?)","string"); fid=mopen(fname,'r'); // use niter=-1 to read up to the end of file // Exracting the file name without extension .s2p dot_pos=strindex(fname,'.'); fname_tit=part(fname,1:dot_pos-1); header=mfscanf(1,fid,'%s'); while ~(header=="50") header=mfscanf(1,fid,'%s'); end indata1=mfscanf(-1,fid,'%f %f %f %f %f %f %f %f %f'); freq_meas=indata1(:,1); freq_meas=freq_meas./1e9; s11_1_real=indata1(:,2); s11_1_imag=indata1(:,3); s12_1_real=indata1(:,4); s12_1_imag=indata1(:,5); s21_1_real=indata1(:,6); s21_1_imag=indata1(:,7); s22_1_real=indata1(:,8); s22_1_imag=indata1(:,9); fname=input("What is the file name 2 (ON STATE)?","string"); fid=mopen(fname,'r'); // use niter=-1 to read up to the end of file // Exracting the file name without extension .s2p dot_pos=strindex(fname,'.'); fname_tit=part(fname,1:dot_pos-1); header=mfscanf(1,fid,'%s'); while ~(header=="50") header=mfscanf(1,fid,'%s'); end indata2=mfscanf(-1,fid,'%f %f %f %f %f %f %f %f %f'); // indata=mfscanf(-1,fid,'%f %f'); freq_meas=indata2(:,1); freq_meas=freq_meas./1e9; s11_2_real=indata2(:,2); s11_2_imag=indata2(:,3); s12_2_real=indata2(:,4); s12_2_imag=indata2(:,5); s21_2_real=indata2(:,6); s21_2_imag=indata2(:,7); s22_2_real=indata2(:,8); s22_2_imag=indata2(:,9); //preparing data for output datafile iso=s12_1_real; il=s12_2_real; rl=s11_2_real; // Plotting IL, RL and ISO in the same plot //*********** Added in Version 13 ************ scf(2); plot2d(freq_meas,[rl iso],rect=[0.5,-40,11,0]); xtitle("",["Frequency(GHz)"],["Return Loss/ Isolation (dB)"]); xgrid(); a=gca(); poly1_1=a.children(1); poly1=poly1_1.children(1); poly1.thickness=2; poly1.foreground=2; //poly2=poly1_1.children(2); //poly2.thickness=2; //poly2.foreground=1; xset("font size",4); a=newaxes(); a.filled="off"; plot2d(freq_meas,il,axesflag=3,rect=[0.5,-1.0,11,0]); a.axes_visible=["off","on","off"]; xtitle(fname_tit,[("")],["Insertion Loss (dB)"]); xset("font size",4); // xgrid(); // Setting polyline properties for plot a=gca(); poly1_1=a.children(1); poly1=poly1_1.children(1); poly1.thickness=2; poly1.foreground=5; // Saving the figure in .scg format // Attaching the .scg extension to file name name_str=[fname_tit,".scg"]; fname_out=strcat(name_str); save(fname_out,gcf()); // op_fname=[fname_tit,".dat"]; op_fname=[fname_tit,".dat"]; op_fname=strcat(op_fname); fid_opfile=mopen(op_fname,'w'); for i=1:length(freq_meas) mfprintf(fid_opfile,'%f %f %f %f n',freq_meas(i),iso(i),il(i),rl(i)); end // mfprintf(fid_opfile,'%f',indata1); mclose('all'); Links: ------ [1] http://lists.scilab.org/mailman/listinfo/users [2] http://mailinglists.scilab.org/Reg-Reading-an-s2p-file-tp4031062.html [3] http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark-lautermann at live.de Tue Aug 19 19:06:32 2014 From: mark-lautermann at live.de (Mark Lautermann) Date: Tue, 19 Aug 2014 19:06:32 +0200 Subject: [Scilab-users] Call_scilab Linux c - undefined reference to `StartScilab' - Message-ID: Hi, i installed Linux(32Bit) in a virtual mashine. Then installed scilab from command line. Following folder struckture comes out: /usr/lib/scillab /usr/include/scilab /usr/share/scilab then i created a short c file test.c : #include "stack-c.h" #include "call_scilab.h" /* Provide functions to call Scilab engine */ int main(void) { if ( StartScilab(getenv("SCI"),NULL,NULL) == FALSE ) { fprintf(stderr,"Error while calling StartScilab\n"); return -1; } SendScilabJob("myMatrix=['sample','for the help']"); return 0; } Set up: export LD_LIBRARY_PATH=/usr/lib/scilab:$LD_LIBRARY_PATH export SCI=/usr/share/scilab Start: gcc -o myExample -lscilab -L/usr/lib/scilab -I/usr/include/scilab test.c (alternative see makefile ) *Error:* gcc -o myExample -lscilab -L/usr/lib/scilab -I/usr/include/scilab test.c test.c: In function \u2018main\u2019: test.c:38:2: warning: passing argument 3 of \u2018StartScilab\u2019 makes integer from pointer without a cast [enabled by default] if ( StartScilab(getenv("SCI"),NULL,NULL) == FALSE ) ^ In file included from test.c:33:0: /usr/include/scilab/call_scilab.h:43:10: note: expected \u2018int\u2019 but argument is of type \u2018void *\u2019 BOOL StartScilab(char *SCIpath, char *ScilabStartup, int Stacksize); ^ /tmp/ccqXRomB.o: In function `main': test.c:(.text+0x48): undefined reference to `StartScilab' test.c:(.text+0x7a): undefined reference to `SendScilabJob' collect2: error: ld returned 1 exit status -- tested on different Linux systems and with the Download version scilab-5.5.0 has anyone tested this? Mark --- Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv. http://www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- SHELL = /bin/sh # A sample Makefile building a C code using Call Scilab using Scilab binary PATH_SCILAB = /usr # Note that PATH_SCILAB can be /usr/ is using a packaged version of Scilab. SCILAB_CFLAGS = -I$(PATH_SCILAB)/include/scilab/ SCILAB_LDFLAGS = -lscilab PATH_TO_LIB_SCILAB = $(PATH_SCILAB)/lib/scilab/ PATH_TO_LIB_CALL_SCILAB = $(PATH_SCILAB)/lib/scilab/ all: test.c export LD_LIBRARY_PATH=$(PATH_TO_LIB_SCILAB):$(PATH_TO_LIB_CALL_SCILAB) gcc -o myExample $(SCILAB_LDFLAGS) -L$(PATH_TO_LIB_SCILAB) -L$(PATH_TO_LIB_CALL_SCILAB) $(SCILAB_CFLAGS) test.c From jrafaelbguerra at hotmail.com Tue Aug 19 21:17:21 2014 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 19 Aug 2014 20:17:21 +0100 Subject: [Scilab-users] Scilab 5.5 filled curve plotting issue? In-Reply-To: <53F2FF6B.4090905@free.fr> References: <53F2FF6B.4090905@free.fr> Message-ID: Hi Samuel, Thanks for pointing to the bug tracker. I have read the explanations but could not find a workaround. I hope what I say is mathematically correct: The two data series provided in my example below seem to be topologically equivalent and if true, why the top plot leaks while bottom one does not? The bottom line is, while a better algorithm is not available, is it possible to know what is required in order to fix input data to plot2d so that it displays properly under the current Scilab algorithm implementation? I.e., how to fix top data series provided so that it displays properly like the bottom one? cid:image003.jpg at 01CFBB45.426D7180 Thanks and regards Rafael G. From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Tuesday, August 19, 2014 8:40 AM To: International users mailing list for Scilab. Subject: Re: [Scilab-users] Scilab 5.5 filled curve plotting issue? Hello Rafael, Le 19/08/2014 01:33, Rafael Guerra a ?crit : Hello, The attached simple Scilab script and data plots quite similar data as filled curves in Scilab 5.5 (Win 7) with quite different results: This is a known bug reported 2 years ago in http://bugzilla.scilab.org/show_bug.cgi?id=11632 Any ideas of what can be causing the completely different behaviour of plot2d / polyline_style = 5? Please see comments #2 and #3 of the report. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 8929 bytes Desc: not available URL: From matiasb at gmail.com Wed Aug 20 11:19:32 2014 From: matiasb at gmail.com (Matiasb) Date: Wed, 20 Aug 2014 02:19:32 -0700 (PDT) Subject: [Scilab-users] Scilab command line: 'unable to open display' Message-ID: <1408526372062-4031071.post@n3.nabble.com> Hi all, I need to run Scilab as a batch program in a linux server which does not have x11 or any display installed. Scilab can be started as a command line using the -nw or -nwni options (-nwni is the one i'm interested in as I don't need plots/graphics). Nevertheless when I try to start scilab using those options I get the following error, as if it would be still trying to get some display. Thanks in advance for any help or pointer on how to solve this issue. Matias *[mbonaven at matiastdaq scilab-5.5.0]$ ./bin/scilab -nwni* Error: unable to open display /usr/bin/chcon: failed to change context of `/afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/bin/scilab-bin' to `system_u:object_r:execmem_exec_t:s0': Operation not supported Error: Cannot chcon 'scilab-bin' /usr/bin/chcon: failed to change context of `/afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/bin/scilab-cli-bin' to `system_u:object_r:execmem_exec_t:s0': Operation not supported Error: Cannot chcon 'scilab-cli-bin' scilab-cli-bin: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by scilab-cli-bin) scilab-cli-bin: /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/thirdparty/libcurl.so.4: no version information available (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/scilab/libscilab-cli.so.0) scilab-cli-bin: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/scilab/libscilab-cli.so.0) scilab-cli-bin: /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/thirdparty/libcrypto.so.0.9.8: no version information available (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/thirdparty/libcurl.so.4) scilab-cli-bin: /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/thirdparty/libssl.so.0.9.8: no version information available (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/thirdparty/libcurl.so.4) scilab-cli-bin: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/scilab/libscifunctions.so.5) scilab-cli-bin: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/scilab/libscicompletion.so.5) scilab-cli-bin: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/scilab/libscihistory_manager.so.5) scilab-cli-bin: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/scilab/libscihdf5.so.5) scilab-cli-bin: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/scilab/libscixml.so.5) scilab-cli-bin: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/thirdparty/libxml2.so.2) scilab-cli-bin: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/thirdparty/libgfortran.so.3) scilab-cli-bin: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /afs/cern.ch/work/m/mbonaven/public/powerDEVS/scilab-5.5.0/lib/thirdparty/libquadmath.so.0) -- View this message in context: http://mailinglists.scilab.org/Scilab-command-line-unable-to-open-display-tp4031071.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sejal.shewaramani at gmail.com Wed Aug 20 13:32:09 2014 From: sejal.shewaramani at gmail.com (Sejal Shewaramani) Date: Wed, 20 Aug 2014 04:32:09 -0700 (PDT) Subject: [Scilab-users] Regarding Wavelet ToolBox for Scilab Message-ID: <1408534329495-4031072.post@n3.nabble.com> Hello, I am a complete newbie to Scilab and since 2 days I am cluelessly struggling to umderstand what is happening. I want to use an open source alternative of MATLAB , so I chose Scilab. Kindly note that I cant access Internet directly from the computer where I am working. QUESTION: I want to decompose an image into its wavelet components. For that I have installed Scilab 5.5 successfully on my Windows PC. now I came to know that I need SIVP, SWT and OpenCV. I read everywhere that they have some GUI based installer for SIVP for Windows. But honestly i couldnt find one. I found only the zip file for SIVP. For SWT i have found some toolbox installer like swt1.0.1forscilab5.5windowsetup.exe, but in that I am getting dll error as my PC is 64 bit and I am unable to find a setup for that. Regarding opencv, i downloaded it, set the two envt variables as read. and further i dont know what is to be done. Any help would be Appreciated. Please give me some way to get my software set up for what i am trying to do. -- View this message in context: http://mailinglists.scilab.org/Regarding-Wavelet-ToolBox-for-Scilab-tp4031072.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From tanthiamhuat at yahoo.com Wed Aug 20 14:50:02 2014 From: tanthiamhuat at yahoo.com (tanthiamhuat) Date: Wed, 20 Aug 2014 05:50:02 -0700 (PDT) Subject: [Scilab-users] Scilab 5.5.0 in Windows Vista OS -- graphics issue Message-ID: <1408539002356-4031073.post@n3.nabble.com> are there any issues of using Scilab 5.5.0 in Windows Vista OS, for graphics? for the below code, it gives me a black screen when run in Windows Vista, but in Windows 7, it is ok. when I run the below code in Windows Vista, using Scilab 5.4.1, it is able to display the correct plot. function f=zdt1(x) f1_x1 = x(:,1); g_x2 = 1 + 9 * ((x(:,2)-x(:,1)).^2); h = 1 - sqrt(f1_x1 ./ g_x2); f(:,1) = f1_x1; f(:,2) = g_x2 .* h; endfunction X_in=rand(1000,2); F_in=zdt1(X_in); [F_out,X_out,Ind_out] = pareto_filter(F_in,X_in) drawlater; plot(F_in(:,1),F_in(:,2),'.r') plot(F_out(:,1),F_out(:,2),'.b') drawnow -- View this message in context: http://mailinglists.scilab.org/Scilab-5-5-0-in-Windows-Vista-OS-graphics-issue-tp4031073.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From grivet at cnrs-orleans.fr Wed Aug 20 15:32:36 2014 From: grivet at cnrs-orleans.fr (grivet) Date: Wed, 20 Aug 2014 15:32:36 +0200 Subject: [Scilab-users] multiple plots In-Reply-To: <1408539002356-4031073.post@n3.nabble.com> References: <1408539002356-4031073.post@n3.nabble.com> Message-ID: <53F4A374.6010901@cnrs-orleans.fr> For a single plot, it is possible to choose many aspects of the plot using, for instance ha = gca(); ha.data_bounds=[-5, -5 ; 20, 20]; Is it possible to have the same possibilities within subplots, like subplot(2,1,1) ha1 = gca(); ha1.data_bounds=[-5, -5 ; 20, 20]; subplot(2,1,2) ha2 = gca; ha2.data_bounds=[-1, -1 ; 2, 2]; (which does not work with Scilab 5.5/win7). I would like to plot two different variables, with different units and ranges. Even more ambitious, I would like to run different animations in each subplot. Thank you for any suggestions. JP Grivet From Serge.Steer at inria.fr Wed Aug 20 21:38:27 2014 From: Serge.Steer at inria.fr (Serge Steer) Date: Wed, 20 Aug 2014 21:38:27 +0200 Subject: [Scilab-users] multiple plots In-Reply-To: <53F4A374.6010901@cnrs-orleans.fr> References: <1408539002356-4031073.post@n3.nabble.com> <53F4A374.6010901@cnrs-orleans.fr> Message-ID: <53F4F933.2070708@inria.fr> ecau Le 20/08/2014 15:32, grivet a ?crit : > For a single plot, it is possible to choose many aspects of the plot > using, for instance > ha = gca(); > ha.data_bounds=[-5, -5 ; 20, 20]; > > Is it possible to have the same possibilities within subplots, like > subplot(2,1,1) > ha1 = gca(); > ha1.data_bounds=[-5, -5 ; 20, 20]; > subplot(2,1,2) > ha2 = gca; take care: here you must write ha2 = gca(); the instruction ha2=gca just copy the gca reference into ha2 > ha2.data_bounds=[-1, -1 ; 2, 2]; > (which does not work with Scilab 5.5/win7). > > I would like to plot two different variables, with different units and > ranges. Even more > ambitious, I would like to run different animations in each subplot. > both are possible. for smooth animation it is better to update the polyline data instead of clearing the window and recreating the subwindows and their children Serge Steer > Thank you for any suggestions. > JP Grivet > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From mark-lautermann at live.de Thu Aug 21 07:04:28 2014 From: mark-lautermann at live.de (x_Mark) Date: Wed, 20 Aug 2014 22:04:28 -0700 (PDT) Subject: [Scilab-users] Call_scilab Linux c - undefined reference to `StartScilab' - In-Reply-To: References: Message-ID: <1408597468725-4031076.post@n3.nabble.com> Ok found the solution. I have linked all libs from lib/scilab. -lscilab is not enough! -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Call-scilab-Linux-c-undefined-reference-to-StartScilab-tp4031068p4031076.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From grivet at cnrs-orleans.fr Thu Aug 21 14:25:46 2014 From: grivet at cnrs-orleans.fr (grivet) Date: Thu, 21 Aug 2014 14:25:46 +0200 Subject: [Scilab-users] multiple plots In-Reply-To: <53F4F933.2070708@inria.fr> References: <1408539002356-4031073.post@n3.nabble.com> <53F4A374.6010901@cnrs-orleans.fr> <53F4F933.2070708@inria.fr> Message-ID: <53F5E54A.7090703@cnrs-orleans.fr> Thank you Serge for correctiong my mistake; my program now work fine. However, I notice that the two subplots are rather small and occupy a small fraction of the overall window. They shrink when the window is made small but they do not get larger than a certain size when i enlarge the window. Is it possible to choose the size of the subplots ? JP Grivet From mark-lautermann at live.de Thu Aug 21 22:08:26 2014 From: mark-lautermann at live.de (x_Mark) Date: Thu, 21 Aug 2014 13:08:26 -0700 (PDT) Subject: [Scilab-users] Scilab command line: 'unable to open display' In-Reply-To: <1408526372062-4031071.post@n3.nabble.com> References: <1408526372062-4031071.post@n3.nabble.com> Message-ID: <1408651706918-4031080.post@n3.nabble.com> did you google this? `GLIBC_2.14' not found maybe this helps http://askubuntu.com/questions/421642/libc-so-6-version-glibc-2-14-not-found -- View this message in context: http://mailinglists.scilab.org/Scilab-command-line-unable-to-open-display-tp4031071p4031080.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From david.w.watson at nasa.gov Thu Aug 21 15:09:14 2014 From: david.w.watson at nasa.gov (watsodw) Date: Thu, 21 Aug 2014 06:09:14 -0700 (PDT) Subject: [Scilab-users] Scilab 5.5.0 fails to start on Mac 10.9.4 Message-ID: <1408626554078-4031079.post@n3.nabble.com> When I run Scilab-5.5.0.app I get the following error: "JavaVM: requested Java version (1.5) not available. Using Java at "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home" instead. Could not create a Scilab main class. Error: Exception in thread "main" java.lang.NoSuchMethodError: javax.media.opengl.GLDrawableFactory.initSingleton()V at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1573) at javax.media.opengl.GLProfile.access$100(GLProfile.java:76) at javax.media.opengl.GLProfile$1.run(GLProfile.java:155) at java.security.AccessController.doPrivileged(Native Method) at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:123) at javax.media.opengl.GLProfile.getProfileMap(GLProfile.java:2070) at javax.media.opengl.GLProfile.get(GLProfile.java:906) at javax.media.opengl.GLProfile.getDefault(GLProfile.java:640) at javax.media.opengl.GLProfile.getDefault(GLProfile.java:651) at org.scilab.modules.gui.SwingView.(Unknown Source) at org.scilab.modules.gui.SwingView.registerSwingView(Unknown Source) at org.scilab.modules.core.Scilab.(Unknown Source) Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available)." Why does Scilab look for a certain Java version? If I run scilab-cli-bin from the terminal I get: dyld: Library not loaded: /usr/lib/libxml2.2.dylib Referenced from: /Users/dwwatson/desktop/scilab-5.5.0.app/contents/macos/bin/scilab-cli-bin Reason: Incompatible library version: scilab-cli-bin requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0 Trace/BPT trap even though libxml2.2.dylib from Macports is in my path before /usr/lib/libxml2.2.dylib. I can run scilab-cli from the terminal and it works. -- View this message in context: http://mailinglists.scilab.org/Scilab-5-5-0-fails-to-start-on-Mac-10-9-4-tp4031079.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From stefan.rau at conducta.endress.com Fri Aug 22 08:56:08 2014 From: stefan.rau at conducta.endress.com (stefan.rau at conducta.endress.com) Date: Fri, 22 Aug 2014 08:56:08 +0200 Subject: [Scilab-users] more than 3 y axis which are not plotted one above the other Message-ID: Hello, I want to plot several curves. The result should look like Hallo, ich muss mehrere Kurven in einem Diagramm darstellen. Es soll so aussehen: http://www.mathworks.com/matlabcentral/fileexchange/screenshots/43/original.jpg Are there any possibility in SciLab to plot the axis like in the picture? I have only found (in the demo_gui() plotyyy) the options left/middle/right for the location of the axis in the plot2d() function. But if I have 2 axis on the right, there is one above the other....so its senseless. Are there any solution for that? Thank you....regards Stefan _________________________________________________________________________ Endress+Hauser Conducta GmbH+Co.KG Amtsgericht Stuttgart HRA 201908 Sitz der Gesellschaft: Gerlingen Pers?nlich haftende Gesellschafterin: Endress+Hauser Conducta Verwaltungsgesellschaft mbH Sitz der Gesellschaft: Gerlingen Amtsgericht Stuttgart HRA 201929 Gesch?ftsf?hrer: Dr. Manfred Jagiella __________________________________________________________________________ Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you receive this in error, please contact the sender and delete the material from any computer. __________________________________________________________________________ http://www.conducta.endress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Aug 22 09:45:42 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 22 Aug 2014 09:45:42 +0200 Subject: [Scilab-users] Scilab 5.5 filled curve plotting issue? In-Reply-To: References: <53F2FF6B.4090905@free.fr> Message-ID: <53F6F526.6030002@free.fr> Hello Rafael, Le 19/08/2014 21:17, Rafael Guerra a ?crit : > > Hi Samuel, > > Thanks for pointing to the bug tracker. > > I have read the explanations but could not find a workaround. > > I hope what I say is mathematically correct: > > /The two data series provided in my example below seem to be > topologically equivalent and if true, / > / Yes, both are self-intersecting polygons. The limitation of the algorithm does not say that none of self-intersecting polygons can be processed conveniently, but that there is no garanty for some of them./ > .../... > > I.e., how to fix top data series provided so that it displays properly > like the bottom one? > By fixing the algo rewritten for Scilab 5.3.0 with heavy downgrades listed in the comment w.r.t. the former one. This is also showing in 3D and reported here: http://bugzilla.scilab.org/show_bug.cgi?id=8310 http://bugzilla.scilab.org/attachment.cgi?id=2068 Regards Samuel > cid:image003.jpg at 01CFBB45.426D7180 > > Thanks and regards > > Rafael G. > > *From:*users [mailto:users-bounces at lists.scilab.org] *On Behalf Of > *Samuel Gougeon > *Sent:* Tuesday, August 19, 2014 8:40 AM > *To:* International users mailing list for Scilab. > *Subject:* Re: [Scilab-users] Scilab 5.5 filled curve plotting issue? > > Hello Rafael, > > Le 19/08/2014 01:33, Rafael Guerra a ?crit : > > Hello, > > The attached simple Scilab script and data plots quite similar > data as filled curves in Scilab 5.5 (Win 7) with quite different > results: > > This is a known bug reported 2 years ago in > http://bugzilla.scilab.org/show_bug.cgi?id=11632 > > > Any ideas of what can be causing the completely different behaviour of > plot2d / polyline_style = 5? > > Please see comments #2 and #3 of the report. > > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 8929 bytes Desc: not available URL: From sgougeon at free.fr Fri Aug 22 10:32:03 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 22 Aug 2014 10:32:03 +0200 Subject: [Scilab-users] more than 3 y axis which are not plotted one above the other In-Reply-To: References: Message-ID: <53F70003.80405@free.fr> Hello Stefan, To do this, you may a) cancel drawing the default axis of the related axes, using the gca().axes_visible property b) replace it using drawaxis(..) to draw an extra axis. It can be drawn in a margin of the related axes. This works only for a linear axis. extra log axis is not supported. A simple example: plot2d() a = gca(); a.axes_visible(2)="off"; drawaxis(tics="r",x=6.7,y=[-2, 2, 8], dir="r", sub_int=5,format_n="%g") You may also have to tune the margin(s), using the gca().margins property. If so, for axes superimposed with newaxes(..), the margin of all superimposed axes will have to be adjusted in the same way. HTH Regards Samuel Le 22/08/2014 08:56, stefan.rau at conducta.endress.com a ?crit : > > Hello, I want to plot several curves. > > The result should look like > > Hallo, ich muss mehrere Kurven in einem Diagramm darstellen. > > Es soll so aussehen: > > _http://www.mathworks.com/matlabcentral/fileexchange/screenshots/43/original.jpg_ > > Are there any possibility in SciLab to plot the axis like in the picture? > > I have only found (in the demo_gui() plotyyy) the options > left/middle/right for the location of the axis in the plot2d() function. > > But if I have 2 axis on the right, there is one above the other....so > its senseless. > > Are there any solution for that? > > Thank you....regards Stefan > > > _________________________________________________________________________ > > Endress+Hauser Conducta GmbH+Co.KG > Amtsgericht Stuttgart HRA 201908 > Sitz der Gesellschaft: Gerlingen > Pers?nlich haftende Gesellschafterin: > Endress+Hauser Conducta > Verwaltungsgesellschaft mbH > Sitz der Gesellschaft: Gerlingen > Amtsgericht Stuttgart HRA 201929 > Gesch?ftsf?hrer: Dr. Manfred Jagiella > __________________________________________________________________________ > > Disclaimer: > > The information transmitted is intended only for the person or entity to > which it is addressed and may contain confidential and/or privileged > material. Any review, retransmission, dissemination or other use of, or > taking of any action in reliance upon, this information by persons or > entities other than the intended recipient is prohibited. If you receive > this in error, please contact the sender and delete the material from any > computer. > > __________________________________________________________________________ > > http://www.conducta.endress.com/ > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hceadecg.png Type: image/png Size: 10567 bytes Desc: not available URL: From stefan.rau at conducta.endress.com Fri Aug 22 11:01:36 2014 From: stefan.rau at conducta.endress.com (stefan.rau at conducta.endress.com) Date: Fri, 22 Aug 2014 11:01:36 +0200 Subject: [Scilab-users] Antwort: Re: more than 3 y axis which are not plotted one above the other In-Reply-To: <53F70003.80405@free.fr> References: <53F70003.80405@free.fr> Message-ID: thanks, that helps a bit. But can you please show me an simple example how I can add 3 axes. I tried to manipulate an axe position by a=gca ();a.margins=[...] but the result wasnt what I want. Additional question: how can i force that a y axis begins by 0 and the plotted curve is automatically fitted to my scale? Thanks! _________________________________________________________________________ Endress+Hauser Conducta GmbH+Co.KG Amtsgericht Stuttgart HRA 201908 Sitz der Gesellschaft: Gerlingen Pers?nlich haftende Gesellschafterin: Endress+Hauser Conducta Verwaltungsgesellschaft mbH Sitz der Gesellschaft: Gerlingen Amtsgericht Stuttgart HRA 201929 Gesch?ftsf?hrer: Dr. Manfred Jagiella __________________________________________________________________________ Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you receive this in error, please contact the sender and delete the material from any computer. __________________________________________________________________________ http://www.conducta.endress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Aug 22 11:18:08 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 22 Aug 2014 11:18:08 +0200 Subject: [Scilab-users] Antwort: Re: more than 3 y axis which are not plotted one above the other In-Reply-To: References: <53F70003.80405@free.fr> Message-ID: <53F70AD0.4070301@free.fr> Le 22/08/2014 11:01, stefan.rau at conducta.endress.com a ?crit : > > thanks, that helps a bit. But can you please show me an simple example > how I can add 3 axes. I tried to manipulate an axe position by > a=gca();a.margins=[...] but the result wasnt what I want. > Try again. As previously written, you must modify the (say right) margin of ALL superimposed axes. Then, it should be rendered as expected. > > > Additional question: how can i force that a y axis begins by 0 and the > plotted curve is automatically fitted to my scale? > by setting gca().data_bounds(2) to 0. http://help.scilab.org/docs/5.5.0/en_US/axes_properties.html Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan.rau at conducta.endress.com Fri Aug 22 11:36:32 2014 From: stefan.rau at conducta.endress.com (stefan.rau at conducta.endress.com) Date: Fri, 22 Aug 2014 11:36:32 +0200 Subject: [Scilab-users] Antwort: Re: Antwort: Re: more than 3 y axis which are not plotted one above the other In-Reply-To: <53F70AD0.4070301@free.fr> References: <53F70003.80405@free.fr> <53F70AD0.4070301@free.fr> Message-ID: Ok, that works now. Is that correct that I can't use an y grid on these additional axis, because the grid works only on the y axis i switched off? _________________________________________________________________________ Endress+Hauser Conducta GmbH+Co.KG Amtsgericht Stuttgart HRA 201908 Sitz der Gesellschaft: Gerlingen Pers?nlich haftende Gesellschafterin: Endress+Hauser Conducta Verwaltungsgesellschaft mbH Sitz der Gesellschaft: Gerlingen Amtsgericht Stuttgart HRA 201929 Gesch?ftsf?hrer: Dr. Manfred Jagiella __________________________________________________________________________ Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you receive this in error, please contact the sender and delete the material from any computer. __________________________________________________________________________ http://www.conducta.endress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Aug 22 12:44:31 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 22 Aug 2014 12:44:31 +0200 Subject: [Scilab-users] Antwort: Re: Antwort: Re: more than 3 y axis which are not plotted one above the other In-Reply-To: References: <53F70003.80405@free.fr> <53F70AD0.4070301@free.fr> Message-ID: <53F71F0F.1070601@free.fr> Le 22/08/2014 11:36, stefan.rau at conducta.endress.com a ?crit : > > Ok, that works now. Is that correct that I can't use an y grid on > these additional axis, because the grid works only on the y axis i > switched off? > I confirm, unfortunately. In my opinion, it's a bad Scilab behavior. I am reporting a bug report about it. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan.rau at conducta.endress.com Fri Aug 22 13:05:50 2014 From: stefan.rau at conducta.endress.com (stefan.rau at conducta.endress.com) Date: Fri, 22 Aug 2014 13:05:50 +0200 Subject: [Scilab-users] Antwort: Re: Antwort: Re: Antwort: Re: more than 3 y axis which are not plotted one above the other In-Reply-To: <53F71F0F.1070601@free.fr> References: <53F70003.80405@free.fr> <53F70AD0.4070301@free.fr> <53F71F0F.1070601@free.fr> Message-ID: Ok, thank you for your fast help! _________________________________________________________________________ Endress+Hauser Conducta GmbH+Co.KG Amtsgericht Stuttgart HRA 201908 Sitz der Gesellschaft: Gerlingen Pers?nlich haftende Gesellschafterin: Endress+Hauser Conducta Verwaltungsgesellschaft mbH Sitz der Gesellschaft: Gerlingen Amtsgericht Stuttgart HRA 201929 Gesch?ftsf?hrer: Dr. Manfred Jagiella __________________________________________________________________________ Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you receive this in error, please contact the sender and delete the material from any computer. __________________________________________________________________________ http://www.conducta.endress.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Aug 22 13:39:33 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 22 Aug 2014 13:39:33 +0200 Subject: [Scilab-users] Antwort: Re: Antwort: Re: more than 3 y axis which are not plotted one above the other In-Reply-To: <53F71F0F.1070601@free.fr> References: <53F70003.80405@free.fr> <53F70AD0.4070301@free.fr> <53F71F0F.1070601@free.fr> Message-ID: <53F72BF5.1000308@free.fr> Le 22/08/2014 12:44, Samuel Gougeon a ?crit : > Le 22/08/2014 11:36, stefan.rau at conducta.endress.com a ?crit : >> >> Ok, that works now. Is that correct that I can't use an y grid on >> these additional axis, because the grid works only on the y axis i >> switched off? >> > I confirm, unfortunately. In my opinion, it's a bad Scilab behavior. I > am reporting a bug report about it. That's it at http://bugzilla.scilab.org/13564 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Aug 23 11:30:42 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 23 Aug 2014 11:30:42 +0200 Subject: [Scilab-users] Antwort: Re: Antwort: Re: more than 3 y axis which are not plotted one above the other In-Reply-To: References: <53F70003.80405@free.fr> <53F70AD0.4070301@free.fr> Message-ID: <53F85F42.4040001@free.fr> Le 22/08/2014 11:36, stefan.rau at conducta.endress.com a ?crit : > > Ok, that works now. Is that correct that I can't use an y grid on > these additional axis, because the grid works only on the y axis i > switched off? > Do you really intend to display 3 overlaying grids, one per axes ? Even with one color for each, the whole readability would likely be poor. If not, then you can keep the axis for which you need a grid as a default one, and add extra axis only for data for which you do not need a grid. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Aug 23 11:56:57 2014 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 23 Aug 2014 10:56:57 +0100 Subject: [Scilab-users] Scilab 5.5 filled curve plotting issue? In-Reply-To: <53F6F526.6030002@free.fr> References: <53F2FF6B.4090905@free.fr> <53F6F526.6030002@free.fr> Message-ID: Hi Samuel, Fyi, adding a small number (~1e-6) to the last sample of the series results in a good filled curve plot2d. Le voil?: ?Never underestimate the ingenuity of complete fools.", Douglas Adams Kind regards, Rafael G. From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Friday, August 22, 2014 8:46 AM To: International users mailing list for Scilab. Subject: Re: [Scilab-users] Scilab 5.5 filled curve plotting issue? Hello Rafael, Le 19/08/2014 21:17, Rafael Guerra a ?crit : Hi Samuel, Thanks for pointing to the bug tracker. I have read the explanations but could not find a workaround. I hope what I say is mathematically correct: The two data series provided in my example below seem to be topologically equivalent and if true, Yes, both are self-intersecting polygons. The limitation of the algorithm does not say that none of self-intersecting polygons can be processed conveniently, but that there is no garanty for some of them. .../... I.e., how to fix top data series provided so that it displays properly like the bottom one? By fixing the algo rewritten for Scilab 5.3.0 with heavy downgrades listed in the comment w.r.t. the former one. This is also showing in 3D and reported here: http://bugzilla.scilab.org/show_bug.cgi?id=8310 http://bugzilla.scilab.org/attachment.cgi?id=2068 Regards Samuel cid:image003.jpg at 01CFBB45.426D7180 Thanks and regards Rafael G. From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Tuesday, August 19, 2014 8:40 AM To: International users mailing list for Scilab. Subject: Re: [Scilab-users] Scilab 5.5 filled curve plotting issue? Hello Rafael, Le 19/08/2014 01:33, Rafael Guerra a ?crit : Hello, The attached simple Scilab script and data plots quite similar data as filled curves in Scilab 5.5 (Win 7) with quite different results: This is a known bug reported 2 years ago in http://bugzilla.scilab.org/show_bug.cgi?id=11632 Any ideas of what can be causing the completely different behaviour of plot2d / polyline_style = 5? Please see comments #2 and #3 of the report. 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 5330 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.jpg Type: image/jpeg Size: 7212 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Sat Aug 23 12:08:22 2014 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 23 Aug 2014 11:08:22 +0100 Subject: [Scilab-users] RE(2): Scilab 5.5 filled curve plotting issue? Message-ID: (my previous email was inaccurate, please disregard it; corrections below) Hi Samuel, Fyi, adding a small number (~1e-6*max) to the series and keeping the ends equal to zero overcomes the self-intersecting issue, resulting in a proper filled-curve plot2d plot. Le voil?: ?Never underestimate the ingenuity of complete fools.", Douglas Adams Kind regards, Rafael G. From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Friday, August 22, 2014 8:46 AM To: International users mailing list for Scilab. Subject: Re: [Scilab-users] Scilab 5.5 filled curve plotting issue? Hello Rafael, Le 19/08/2014 21:17, Rafael Guerra a ?crit : Hi Samuel, Thanks for pointing to the bug tracker. I have read the explanations but could not find a workaround. I hope what I say is mathematically correct: The two data series provided in my example below seem to be topologically equivalent and if true, Yes, both are self-intersecting polygons. The limitation of the algorithm does not say that none of self-intersecting polygons can be processed conveniently, but that there is no garanty for some of them. .../... I.e., how to fix top data series provided so that it displays properly like the bottom one? By fixing the algo rewritten for Scilab 5.3.0 with heavy downgrades listed in the comment w.r.t. the former one. This is also showing in 3D and reported here: http://bugzilla.scilab.org/show_bug.cgi?id=8310 http://bugzilla.scilab.org/attachment.cgi?id=2068 Regards Samuel cid:image003.jpg at 01CFBB45.426D7180 Thanks and regards Rafael G. From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Tuesday, August 19, 2014 8:40 AM To: International users mailing list for Scilab. Subject: Re: [Scilab-users] Scilab 5.5 filled curve plotting issue? Hello Rafael, Le 19/08/2014 01:33, Rafael Guerra a ?crit : Hello, The attached simple Scilab script and data plots quite similar data as filled curves in Scilab 5.5 (Win 7) with quite different results: This is a known bug reported 2 years ago in http://bugzilla.scilab.org/show_bug.cgi?id=11632 Any ideas of what can be causing the completely different behaviour of plot2d / polyline_style = 5? Please see comments #2 and #3 of the report. 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 5330 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 7212 bytes Desc: not available URL: From abhi24394 at gmail.com Sat Aug 23 21:27:07 2014 From: abhi24394 at gmail.com (abhi24394) Date: Sat, 23 Aug 2014 12:27:07 -0700 (PDT) Subject: [Scilab-users] Queries about vector and complex numbers In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F40B258643@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F408800B58@301EX00100.sidel.com> <1404459177154-4030821.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F40B14B044@301EX00100.sidel.com> <1404508963586-4030826.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F40B258643@301EX00100.sidel.com> Message-ID: <1408822027873-4031093.post@n3.nabble.com> Thanks for help Christophe I have coded the example of cross product as per your suggestions lastly i want to know how can i display this on my console. It should be a .sce file. Thanks in advance. -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Queries-about-vector-and-complex-numbers-tp4030767p4031093.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From vincent.couvert at scilab-enterprises.com Mon Aug 25 17:23:51 2014 From: vincent.couvert at scilab-enterprises.com (Vincent COUVERT) Date: Mon, 25 Aug 2014 17:23:51 +0200 Subject: [Scilab-users] Scilab command line: 'unable to open display' In-Reply-To: <1408651706918-4031080.post@n3.nabble.com> References: <1408526372062-4031071.post@n3.nabble.com> <1408651706918-4031080.post@n3.nabble.com> Message-ID: <53FB5507.2040905@scilab-enterprises.com> Hello, This issue is fixed in Scilab nightly-build versions: http://www.scilab.org/en/development/nightly_builds/branch55 Regards, Le 21/08/2014 22:08, x_Mark a ?crit : > did you google this? > `GLIBC_2.14' not found > > maybe this helps > http://askubuntu.com/questions/421642/libc-so-6-version-glibc-2-14-not-found > > > > -- > View this message in context: http://mailinglists.scilab.org/Scilab-command-line-unable-to-open-display-tp4031071p4031080.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From yanndebray at yahoo.fr Mon Aug 25 12:08:12 2014 From: yanndebray at yahoo.fr (Yann Debray) Date: Mon, 25 Aug 2014 11:08:12 +0100 Subject: [Scilab-users] Regarding Wavelet ToolBox for Scilab In-Reply-To: <1408534329495-4031072.post@n3.nabble.com> References: <1408534329495-4031072.post@n3.nabble.com> Message-ID: <1408961292.88586.YahooMailNeo@web133105.mail.ir2.yahoo.com> Hi, You can find a toolbox for Wavelets (called Wavelib) and lessons based upon it on the following link: http://alex.nt.fh-koeln.de/wavecourse.html Hereby is also the introduction tutorial for the toolbox. Do not hesitate to give feedback and example about your usage. Sincerely yours Yann Debray Le Mercredi 20 ao?t 2014 13h34, Sejal Shewaramani a ?crit : Hello, I am a complete newbie to Scilab and since 2 days I am cluelessly struggling to umderstand what is happening. I want to use an open source alternative of MATLAB , so I chose Scilab. Kindly note that I cant access Internet directly from the computer where I am working. QUESTION: I want to decompose an image into its wavelet components. For that I have installed Scilab 5.5 successfully on my Windows PC. now I came to know that I need SIVP, SWT and OpenCV. I read everywhere that they have some GUI based installer for SIVP for Windows. But honestly i couldnt find one. I found only the zip file for SIVP. For SWT i have found some toolbox installer like swt1.0.1forscilab5.5windowsetup.exe, but in that I am getting dll error as my PC is 64 bit and I am unable to find a setup for that. Regarding opencv, i downloaded it, set the two envt variables as read. and further i dont know what is to be done. Any help would be Appreciated. Please give me some way to get my software set up for what i am trying to do. -- View this message in context: http://mailinglists.scilab.org/Regarding-Wavelet-ToolBox-for-Scilab-tp4031072.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: wavelib_intro.pdf Type: application/force-download Size: 510486 bytes Desc: not available URL: From clement.david at scilab-enterprises.com Tue Aug 26 11:27:14 2014 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Tue, 26 Aug 2014 11:27:14 +0200 Subject: [Scilab-users] Scilab In-Reply-To: References: Message-ID: <1409045234.2246.5.camel@paros> Hello Gcinumuzi, Le samedi 16 ao?t 2014 ? 16:33 +0200, Gcinumuzi Ngwenya a ?crit : > Good Afternoon ladies and gentlemen > > My name is Gcinumuzi Ngwenya from South Africa. I am doing my BTech in > Chemical Engineering and right now we have been introduced to Scilab > but I am really struggling at the moment. Can you guys please help me > with this two questions? Yep I will ! > 1. I have been plotting a transfer function graph on scilab and I see > that on the x-axis it starts at 1 and end up on the value which I > entered for final integration time, what informs scilab or the graph > to start at 1, or what is the reason for it to start at 1? I got this > graph when I was doing an example for the beginners on scilab website In fact the simulation start at t=0 however the "0" x axis label is not displayed on the plot. To confirm, just zoom in at the start of the plot. > 2. what is meant by buffer size on the simulation/setup menu ? I assume you are asking about the buffer size of a scope ; This is kind of an optimization setting which was used before Scilab 5.4.0. Due to the graphic re-implementation (5.4 and later) I do not see any visible effect anymore. > 3. is there a document that can explain to me the function of each > palette on xcos? The palettes and each block should be documented on the Scilab help. > Thanking you in advance for your assistance > > Best Regards > > Gcinumuzi Regards, -- Cl?ment From sejal.shewaramani at gmail.com Tue Aug 26 14:22:18 2014 From: sejal.shewaramani at gmail.com (Sejal Shewaramani) Date: Tue, 26 Aug 2014 05:22:18 -0700 (PDT) Subject: [Scilab-users] Regarding Wavelet ToolBox for Scilab In-Reply-To: <1408961292.88586.YahooMailNeo@web133105.mail.ir2.yahoo.com> References: <1408534329495-4031072.post@n3.nabble.com> <1408961292.88586.YahooMailNeo@web133105.mail.ir2.yahoo.com> Message-ID: <1409055738959-4031098.post@n3.nabble.com> Hello, Thanks a lot for replying. While I was searching for wavelet toolboxes, I did come across wavelib, but I wasnt sure about how to use it at that time. Then I thought of using a toolbox which is exclusively only for wavelets. Because that is what I wanted basically. (Now, sorry because this is not related to Scilab usage.) So, I tried a toolbox called Waili. I have by now successfully configured and compiled the source. And I hope this library helps me. Any suggestions from your side are very much appreciated, if you think that may be I am on the wrong way. Regards, Sejal -- View this message in context: http://mailinglists.scilab.org/Regarding-Wavelet-ToolBox-for-Scilab-tp4031072p4031098.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Christophe.Dang at sidel.com Tue Aug 26 16:54:45 2014 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Tue, 26 Aug 2014 16:54:45 +0200 Subject: [Scilab-users] Queries about vector and complex numbers In-Reply-To: <1408822027873-4031093.post@n3.nabble.com> References: <3B5FFC67498DFF49AE7271A584867D16F408800B58@301EX00100.sidel.com> <1404459177154-4030821.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F40B14B044@301EX00100.sidel.com> <1404508963586-4030826.post@n3.nabble.com> <3B5FFC67498DFF49AE7271A584867D16F40B258643@301EX00100.sidel.com> <1408822027873-4031093.post@n3.nabble.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F40BAEBE20@301EX00100.sidel.com> Hello, > De abhi24394 > Envoy? : samedi 23 ao?t 2014 21:27 > > I have coded the example of cross product as per your suggestions > lastly i want to know how can i display this on my console. > It should be a .sce file. The function disp(myVar) displays the content of the variable myVar. You might also try disp(string(myVar)) disp(myVar, "myVar = ") disp(string(myVar), "myVar = ") Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer ______________________________________________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ______________________________________________________________________ From tanthiamhuat at yahoo.com Wed Aug 27 15:28:56 2014 From: tanthiamhuat at yahoo.com (tanthiamhuat) Date: Wed, 27 Aug 2014 06:28:56 -0700 (PDT) Subject: [Scilab-users] Double Summation in Scilab Message-ID: <1409146136483-4031100.post@n3.nabble.com> how do we do a double summation in Scilab, which itself include summation too? example see picture attached. can I have some code templates? -- View this message in context: http://mailinglists.scilab.org/Double-Summation-in-Scilab-tp4031100.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From grivet at cnrs-orleans.fr Wed Aug 27 15:34:49 2014 From: grivet at cnrs-orleans.fr (grivet) Date: Wed, 27 Aug 2014 15:34:49 +0200 Subject: [Scilab-users] truncated postscript image In-Reply-To: <53CE86D6.5040006@inria.fr> References: <1406021922863-4030943.post@n3.nabble.com> <53CE86D6.5040006@inria.fr> Message-ID: <53FDDE79.1090008@cnrs-orleans.fr> Hi, I believe there is a bug in the export function for postscript and encapsulated postscript, under win7, 64bits, with both Scilab 5.4.1 and 5.5. When I use a wide plotting window and then choose export to [encapsulated] postscript, then the resulting figure is truncated; its width is never larger than 600 pixels. This behavior is independant of the choice portrait/landscape. Could the problem be linked to the use of wide (16x9) screens ? On the other hand, export to .gif or to .pdf works fine. Can somebody confirm this bug ? JP Grivet From tanthiamhuat at yahoo.com Thu Aug 28 03:05:58 2014 From: tanthiamhuat at yahoo.com (tanthiamhuat) Date: Wed, 27 Aug 2014 18:05:58 -0700 (PDT) Subject: [Scilab-users] Double Summation in Scilab In-Reply-To: <1409146136483-4031100.post@n3.nabble.com> References: <1409146136483-4031100.post@n3.nabble.com> Message-ID: <1409187958396-4031102.post@n3.nabble.com> the formuation is as below: http://postimg.org/image/cg25hlzvh/ -- View this message in context: http://mailinglists.scilab.org/Double-Summation-in-Scilab-tp4031100p4031102.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From antoine.monmayrant at laas.fr Thu Aug 28 07:53:25 2014 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 28 Aug 2014 07:53:25 +0200 Subject: [Scilab-users] Double Summation in Scilab In-Reply-To: <1409187958396-4031102.post@n3.nabble.com> References: <1409146136483-4031100.post@n3.nabble.com> <1409187958396-4031102.post@n3.nabble.com> Message-ID: <53FEC3D5.1040200@laas.fr> Le 28/08/14 03:05, tanthiamhuat a ?crit : > the formuation is as below: > > http://postimg.org/image/cg25hlzvh/ > > > > -- > View this message in context: http://mailinglists.scilab.org/Double-Summation-in-Scilab-tp4031100p4031102.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > If you have stored the terms of your sum in a matrix "mat", let's say with "t" index for the row and "p" index for the column, you can sum over "t" using "sum(mat, 'r')", sum over "p" using "sum(mat, 'c')" and sum everything using "sum(mat)". Hope it helps, Antoine From Christophe.Dang at sidel.com Thu Aug 28 16:22:09 2014 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Thu, 28 Aug 2014 16:22:09 +0200 Subject: [Scilab-users] Pairwise distance of a huge amount of points Message-ID: <3B5FFC67498DFF49AE7271A584867D16F40BB4FA68@301EX00100.sidel.com> Hello, I need to compute the pairwise distance of a huge amount of points, namely n = 49545. I re-read a previous discussion http://mailinglists.scilab.org/Plot-overlays-on-images-tp2617675p4030599.html So, I'm trying yo avoid loops, but I need then at least to have a vectors, or sparse matrices, containing n*(n+1)/2 elements, i.e. 1.227D+09, which of course exceeds the maximum stacksize. Any hint? FYI, three vectors of size n called X0, Y0 and Z0, the following procedure works well for small vectors (I tried with n = 1000) // ********** n = size(X0, "r"); // amount of points uns = sparse(triu(ones(n, n))); // sparse upper triangle matrix of ones Xd = meshgrid(X0).*uns; Yd = meshgrid(Y0).*uns; Zd = meshgrid(Z0).*uns; Xf = meshgrid(X0)'.*uns; Yf = meshgrid(Y0)'.*uns; Zf = meshgrid(Z0)'.*uns; D = sqrt((Xf - Xd).^2 + (Yf - Yd).^2 + (Zf - Zd).^2); // ********** in my case, it stops at step 2. The limiting operation is ones(n, n), which requires a n*n matrix. Using directly sparse() also requires a n^2 vector. It might be possible to work with higher values of n by generating a sparse matrix without generating a n*n matrix (or a n^2 vector), as there are only n*(n+1)/2 non-zeroes values -- Is it possible? (Anyway, in my case, it is still too big). -- Christophe Dang Ngoc Chan Mechanical calculation engineer ______________________________________________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ______________________________________________________________________ From sgougeon at free.fr Thu Aug 28 23:58:52 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 28 Aug 2014 23:58:52 +0200 Subject: [Scilab-users] Pairwise distance of a huge amount of points In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F40BB4FA68@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F40BB4FA68@301EX00100.sidel.com> Message-ID: <53FFA61C.4040905@free.fr> Hello Christophe, Le 28/08/2014 16:22, Dang, Christophe a ?crit : > Hello, > > I need to compute the pairwise distance of a huge amount of points, namely n = 49545. > > I re-read a previous discussion > http://mailinglists.scilab.org/Plot-overlays-on-images-tp2617675p4030599.html > > So, I'm trying yo avoid loops, I'm afraid you can't. You will need one loop over slices along one of both dimensions. Such a slicing algorithm in an identical situation is used inside members.sci. You may edit it and see. HTH Samuel From tanthiamhuat at yahoo.com Fri Aug 29 00:39:41 2014 From: tanthiamhuat at yahoo.com (tanthiamhuat) Date: Thu, 28 Aug 2014 15:39:41 -0700 (PDT) Subject: [Scilab-users] Double Summation in Scilab In-Reply-To: <1409187958396-4031102.post@n3.nabble.com> References: <1409146136483-4031100.post@n3.nabble.com> <1409187958396-4031102.post@n3.nabble.com> Message-ID: <1409265581495-4031107.post@n3.nabble.com> thanks for the hint, I would try out that. -- View this message in context: http://mailinglists.scilab.org/Double-Summation-in-Scilab-tp4031100p4031107.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From lgunseor at boumatic.com Thu Aug 28 18:54:30 2014 From: lgunseor at boumatic.com (lgunseor at boumatic.com) Date: Thu, 28 Aug 2014 11:54:30 -0500 Subject: [Scilab-users] having an issue with 5.5.0 release Message-ID: When using 5.4.1 or the 5.5 beta version I don't have any issues with my program, it runs fine with no errors. When running it on the latest 5.5.0 release I get errors (see below) and some of the plots are missing from the graph. plot2d(X,Y) !--error 999 plot2d: Wrong size for input arguments: Incompatible sizes. Error 999 : in plot2d called by plotplot2d(X,Y) !--error 999 plot2d: Wrong size for input arguments: Incompatible sizes. Error 999 : in plot2d called by plot Attached is the program along with the data being used for the program. Is this a bug issue with the latest 5.5.0 release. Don't understand why I'm getting these errors. Larry A. Gunseor Systems Architecture Engineer BouMatic PO Box 8050 Madison, WI 53708 lgunseor at boumatic.com +1.608.316.3415 Office +1.608.636.0026 Mobile +1.608.222.9314 Fax -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 3032 bytes Desc: image001.jpg URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 20140819_131334_21481.rar Type: application/octet-stream Size: 2709361 bytes Desc: 20140819_131334_21481.rar URL: From simon.bedert at gmail.com Fri Aug 29 08:24:22 2014 From: simon.bedert at gmail.com (simon bedert) Date: Fri, 29 Aug 2014 08:24:22 +0200 Subject: [Scilab-users] Scilab 5.5.0 error 17 on startup Message-ID: Dear Scilab Users, Yesterday, I installed and worked with Scilab 5.5.0 on my office computer. Coming back today (office PC has hibernated through the night), I get the following error every time I start up Scilab, even after a reboot: Warning !!! Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION) with "predef" function. Save your data and restart Scilab. return !--error 17 stack size exceeded! Use stacksize function to increase it. Memory used for variables: 105 Intermediate memory needed: 179903 Total memory available: 180006 at line **** of function called by : endfunction at line 42 of exec file called by : exec('SCI/etc/scilab.start',-1);; I'm running Scilab on a PC with an Intel Xeon E5530 CPU (2.4 GHz), with 4 GB RAM and windows 7 64 bit operating system, so I do not expect performance to be the issue. Any ideas? Thank you in advance, Simon Bedert -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Fri Aug 29 09:29:43 2014 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Fri, 29 Aug 2014 09:29:43 +0200 Subject: [Scilab-users] Pairwise distance of a huge amount of points In-Reply-To: <53FFA61C.4040905@free.fr> References: <3B5FFC67498DFF49AE7271A584867D16F40BB4FA68@301EX00100.sidel.com> <53FFA61C.4040905@free.fr> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F40BB4FC7E@301EX00100.sidel.com> Hello, > De Samuel Gougeon > Envoy? : jeudi 28 ao?t 2014 23:59 > > You will need one loop over slices along one of both dimensions. > Such a slicing algorithm in an identical situation is used inside members.sci. OK, I just overlooked the file but am lazy to read a 400 lines script and prefered to write from scratch (-: My script so far looks like // ********** n = size(X0, "r"); // amount of points dmax = 0; for i = 1:n-1 d = max(sqrt((X0(1:$-i) - X0(i+1:$)).^2 + (Y0(1:$-i) - Y0(i+1:$)).^2 +... (Z0(1:$-i) - Z0(i+1:$)).^2)); if d > dmax then dmax = d; end end // ********** tested on a subset of 1000 data, it gives the same result as the naive n^2 calculation, and is 64 times faster. Thanks for the help. -- Christophe Dang Ngoc Chan Mechanical calculation engineer ______________________________________________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ______________________________________________________________________ From Christophe.Dang at sidel.com Fri Aug 29 12:58:03 2014 From: Christophe.Dang at sidel.com (Dang, Christophe) Date: Fri, 29 Aug 2014 12:58:03 +0200 Subject: [Scilab-users] Pairwise distance of a huge amount of points In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F40BB4FC7E@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F40BB4FA68@301EX00100.sidel.com> <53FFA61C.4040905@free.fr> <3B5FFC67498DFF49AE7271A584867D16F40BB4FC7E@301EX00100.sidel.com> Message-ID: <3B5FFC67498DFF49AE7271A584867D16F40BB4FE3B@301EX00100.sidel.com> Just to close the subject: I tried to implement the algorithm with sparse matrices, and it is less efficient than scanning over one dimension: 7 times faster than the naive algorithm. If I generate the sparse matrix from a n*(n-1)/2 vector, it is even worse: less efficient than the naive algorithm (1.1 times longer), this only to gain a factor 2 on the amount of points that can be handeled. Conclusion: forget the sparse matrices for this application. -- Christophe Dang Ngoc Chan Mechanical calculation engineer ______________________________________________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ______________________________________________________________________ From shorne at energetiq.com Fri Aug 29 16:38:19 2014 From: shorne at energetiq.com (shorne at energetiq.com) Date: Fri, 29 Aug 2014 10:38:19 -0400 Subject: [Scilab-users] Pairwise distance of a huge amount of points In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F40BB4FE3B@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F40BB4FA68@301EX00100.sidel.com> <53FFA61C.4040905@free.fr> <3B5FFC67498DFF49AE7271A584867D16F40BB4FC7E@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F40BB4FE3B@301EX00100.sidel.com> Message-ID: Jumping in late -- If your goal is to find nearest the N neighbors of a given point, look up the K-D Tree algorithm --( I used it some decades ago... in my case the points were each of higher dimension -- around 9 or so.) And if that is the application, and you want to go fast - consider using something other than the L-2 norm to set up the tree. L-1 should be much faster - sum of absolute values of component distances; no squaring or square roots -- "Manhattan norm" Once you have built the tree and retrieved a bunch of nearest neighbors, you can of course compute the L-2 distances over that much smaller set, if necessary... S From: "Dang, Christophe" To: "International users mailing list for Scilab." , Date: 08/29/2014 06:58 AM Subject: Re: [Scilab-users] Pairwise distance of a huge amount of points Sent by: "users" Just to close the subject: I tried to implement the algorithm with sparse matrices, and it is less efficient than scanning over one dimension: 7 times faster than the naive algorithm. If I generate the sparse matrix from a n*(n-1)/2 vector, it is even worse: less efficient than the naive algorithm (1.1 times longer), this only to gain a factor 2 on the amount of points that can be handeled. Conclusion: forget the sparse matrices for this application. -- Christophe Dang Ngoc Chan Mechanical calculation engineer ______________________________________________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ______________________________________________________________________ _______________________________________________ users mailing list users at lists.scilab.org http://cp.mcafee.com/d/1jWVIe418SyNsQsITd79EVpKrKrsKDtCXUUSVteXaaapJOWtSrLL6T4S7bLzC3t2toMY5v3UAvD8mVsTYfyh-sxrBPrTSvLtx_HYCCyyyyqeuLsKyqerTVBdV4sMZORQr8EGTsjVkffGhBrwqrhdECXYCej79zANOoUTsS03fBiteFqh-Ae00U9GX33VkDa3JsrFYq6SWv6xsxlK5LE2zVkDjGmAvF3w09JZdNcS2_id41Fr6bifQwnrFYq6BQQg1rphciFVEwgBiuMJVEwGWq8dd41dIzVEwRmHs9Cy2HFEwmHa4W6T6jp-xPMhmc -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Aug 29 23:38:52 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 29 Aug 2014 23:38:52 +0200 Subject: [Scilab-users] having an issue with 5.5.0 release In-Reply-To: References: Message-ID: <5400F2EC.7090200@free.fr> Le 28/08/2014 18:54, lgunseor at boumatic.com a ?crit : > > When using 5.4.1 or the 5.5 beta version I don't have any issues with > my program, it runs fine with no errors. When running it on the > latest 5.5.0 release I get errors (see below) and some of the plots > are missing from the graph. > > plot2d(X,Y) > !--error 999 > plot2d: Wrong size for input arguments: Incompatible sizes. > > Error 999 : in plot2d called by plotplot2d(X,Y) > !--error 999 > plot2d: Wrong size for input arguments: Incompatible sizes. > > Error 999 : in plot2d called by plot > > Attached is the program along with the data being used for the > program. Is this a bug issue with the latest 5.5.0 release. Don't > understand why I'm getting these errors. > How to debug? 1) Since it is not properly identified with whereis() in the error message => look for the plotting instruction yielding the error. To do so, no chance to succeed by running the whole script in a blind way. Run it step by step, selecting the whole starting part, down to the first plotting instruction that could trigger the error, and run the selection. If there is no error, select the following lines down to the next plotting instruction ; run them, and see. etc.. down to the plot yielding the error. 2) For this plotting instruction : display the size of each of the first two input parameters, and compare them. 3) Look in the help page of the involved plot/plot2 instruction whether the format of input parameters that you try to pas to the plot is accepted or not. You will see that it is not the case. There are indeed mismatching parameters. 4) correct your program. 5) test it. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Aug 29 23:50:52 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 29 Aug 2014 23:50:52 +0200 Subject: [Scilab-users] Pairwise distance of a huge amount of points In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F40BB4FC7E@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F40BB4FA68@301EX00100.sidel.com> <53FFA61C.4040905@free.fr> <3B5FFC67498DFF49AE7271A584867D16F40BB4FC7E@301EX00100.sidel.com> Message-ID: <5400F5BC.4000901@free.fr> Le 29/08/2014 09:29, Dang, Christophe a ?crit : > Hello, > >> De Samuel Gougeon >> Envoy? : jeudi 28 ao?t 2014 23:59 >> >> You will need one loop over slices along one of both dimensions. >> Such a slicing algorithm in an identical situation is used inside members.sci. > OK, I just overlooked the file but am lazy to read a 400 lines script and prefered to write from scratch (-: Yes. Actually the algo in members() defines and runs over multiline slices, that shortens a lot the number of iterations in the explicit loop (in order to maximize the vectorized (and so faster) processing of the bloc/slice), but is more complex to implement. Since using single lines in the loop already saves a lot of time for your case, and is enough, simplicity is smarter. Samuel From sgougeon at free.fr Sat Aug 30 00:01:37 2014 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 30 Aug 2014 00:01:37 +0200 Subject: [Scilab-users] Pairwise distance of a huge amount of points In-Reply-To: <3B5FFC67498DFF49AE7271A584867D16F40BB4FE3B@301EX00100.sidel.com> References: <3B5FFC67498DFF49AE7271A584867D16F40BB4FA68@301EX00100.sidel.com> <53FFA61C.4040905@free.fr> <3B5FFC67498DFF49AE7271A584867D16F40BB4FC7E@301EX00100.sidel.com> <3B5FFC67498DFF49AE7271A584867D16F40BB4FE3B@301EX00100.sidel.com> Message-ID: <5400F841.3050405@free.fr> Le 29/08/2014 12:58, Dang, Christophe a ?crit : > Just to close the subject: > > I tried to implement the algorithm with sparse matrices, and it is less efficient than scanning over one dimension: 7 times faster than the naive algorithm. Yes, it was somewhat expected. Also for memory consumption, the sparse encoding becomes interesting vs the dense encoding only when the sparsity becomes smaller than .. 50%. There was a quite recent thread on bugzilla, about the relevance of keeping a sparse encoding for the result of cos(SP) where SP is a sparse (so with a good fraction of null values). It was finally -- wisely -- decided (after some tests) to switch to a dense encoding for that case (as it should be for any function turning 0 into a non-null value). Samuel From sdr at durietz.se Sat Aug 30 13:14:05 2014 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 30 Aug 2014 13:14:05 +0200 Subject: [Scilab-users] integers? Message-ID: <5401B1FD.1080504@durietz.se> Hello, I got a strange error and tried to debug it: -1->dv dv = 2014. 8. 31. 8. 0. Is the third element more than the number of days in the month? -->eday = eomday(2014, 8) eday = 31. -1->incmon = find(dv(:, 3) > eday) incmon = 1. But both are integers 31.: -1->[dv(3), eday] ans = 31. 31. So why these: -1->dv(3) > eday ans = T -1->dv(3)==31. ans = F -1->dv(3) - 31. ans = 3.881D-11 Regards Stefan