From scilab.20.browseruk at xoxy.net Fri Apr 1 01:38:42 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Thu, 31 Mar 2016 15:38:42 -0800 Subject: [Scilab-users] Running an .sce from the command line. message 9 of 20) In-Reply-To: <56FD75E0.5040603@free.fr> References: <950332e10de.0000093escilab.20.browseruk@xoxy.net> Message-ID: <97A89D95B36.00000045scilab.20.browseruk@xoxy.net> Samuel, Thanks. I had to do it in two steps: f = gcf(); f.closerequestfcn="exit(0)"; otherwise I get: gcf().closerequestfcn="exit(0)"; !--error 2 Invalid factor. The focus still returns to the command line console pushing the graphics window into the background and meaning I have to go looking for it to see the plot; but when I close it the console exits back to the OS. Next problem, that should probably be a new thread: How to avoid the Singularity of log function from preventing the script completing if the data contains zeros? I'm doing: plot( log10( a ), b ); To produce the log plot. > -----Original Message----- > From: scilab.browseruk.bb30c473ec.sgougeon#free.fr at ob.0sg.net > Sent: Thu, 31 Mar 2016 21:09:20 +0200 > To: users at lists.scilab.org > Subject: Re: [Scilab-users] Running an .sce from the command line. > (scilab: message 9 of 20) > > Hello, > > Le 31/03/2016 20:35, scilab.20.browseruk at xoxy.net a ?crit : >> Hi, >> >> I can run my .sce file which produces a graph from a file of data from >> the (windows) command line using: >> >> scilex -f myscript.sce filename.rdat >> >> and that works except: >> >> Once the plot() executes and the graphic window appears, control and >> focus returns to the interactive command line. > Scilab's console, i guess not the shell terminal. > >> That's okay; but it'd would be really nice if the focus remained on the >> graphic window until it was closed and then the scilab shell exited >> automatically. > Graphics are not modal: AFAIK it is not possible to lock the console > with a figure until the figure is closed (or until any other event)(you > could use a for loop waiting for an event ; but it won't reject CTRL-C > interruptions). > However, to close automatically Scilab when the figure is closed, you > may add the following in your script: > gcf().closerequestfcn="exit(0)"; > > HTH > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/manager From Tim at Wescottdesign.com Fri Apr 1 02:33:23 2016 From: Tim at Wescottdesign.com (Tim Wescott) Date: Thu, 31 Mar 2016 17:33:23 -0700 Subject: [Scilab-users] Running an .sce from the command line. message 9 of 20) Message-ID: plot2d (a, b, logflag = "ln") Look at help for plot2d for details.? Sent from my Verizon Wireless 4G LTE smartphone -------- Original message -------- From: scilab.20.browseruk at xoxy.net Date: 03/31/2016 4:38 PM (GMT-07:00) To: users at lists.scilab.org Subject: Re: [Scilab-users] Running an .sce from the command line. message 9 of 20) Samuel, Thanks. I had to do it in two steps: ??? f = gcf(); ??? f.closerequestfcn="exit(0)"; otherwise I get: ??? gcf().closerequestfcn="exit(0)"; ???????? !--error 2 ??? Invalid factor. The focus still returns to the command line console pushing the graphics window into the background and meaning I have to go looking for it to see the plot; but when I close it the console exits back to the OS. Next problem, that should probably be a new thread: How to avoid the Singularity of log function from preventing the script completing if the data contains zeros? I'm doing: ??? plot( log10( a ), b ); To produce the log plot. > -----Original Message----- > From: scilab.browseruk.bb30c473ec.sgougeon#free.fr at ob.0sg.net > Sent: Thu, 31 Mar 2016 21:09:20 +0200 > To: users at lists.scilab.org > Subject: Re: [Scilab-users] Running an .sce from the command line. > (scilab: message 9 of 20) > > Hello, > > Le 31/03/2016 20:35, scilab.20.browseruk at xoxy.net a ?crit : >> Hi, >> >> I can run my .sce file which produces a graph from a file of data from >> the (windows) command line using: >> >>????? scilex -f myscript.sce filename.rdat >> >> and that works except: >> >> Once the plot() executes and the graphic window appears, control and >> focus returns to the interactive command line. > Scilab's console, i guess not the shell terminal. > >> That's okay; but it'd would be really nice if the focus remained on the >> graphic window until it was closed and then the scilab shell exited >> automatically. > Graphics are not modal: AFAIK it is not possible to lock the console > with a figure until the figure is closed (or until any other event)(you > could use a for loop waiting for an event ; but it won't reject CTRL-C > interruptions). > However, to close automatically Scilab when the figure is closed, you > may add the following in your script: > gcf().closerequestfcn="exit(0)"; > > HTH > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/manager _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From scilab.20.browseruk at xoxy.net Fri Apr 1 02:56:20 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Thu, 31 Mar 2016 16:56:20 -0800 Subject: [Scilab-users] Running an .sce from the command line. message 9 (scilab: message 11 of 20) of 20) In-Reply-To: Message-ID: <985623E5A5C.00000096scilab.20.browseruk@xoxy.net> Tim, I've implemented that, and it certainly avoids the singularity; but creates other problems. For example: To choose the colors for successive plots, I set up a list: rgb = list( [0,0,0], [1,0,0], [0,1,0], [0,0,1], ... ); and supplied the color to plot using: for i = 1:size( files, 'r' ) [ H, tH ] = fscanfMat( files(i), "%lg" ); ... plot( a, b, 'color', rgb(i) ) end but plot2d() requires a *color index* So (after trying a bunch of other things) I came up with: rgb = list( color(0,0,0), color(1,0,0), color(0,1,0), color(0,0,1), ... ); for i = 1:size( files, 'r' ) [ H, tH ] = fscanfMat( files(i), "%lg" ); ... plot2d( 'ln', a, b, style = [ rgb(i) ] ); end which compiles and runs without error, but draws everything in black? I need a logflag parameter for plot(); or a sane color(rgb) option for plot2d()? Alternatively, insight to whatever magic/error trapping/error control that the plot2d( 'nl' ) flag uses to avoid the singularity problem? Cheers, Buk. (BTW: I enjoyed reading the bits of your book you pointed me at; and (with your permission) I might ask for a little 'advice' off-list on the subject of friction: aluminium on teflon and the problems of 'creep'. Be warned before you agree. I know next to nothing about friction! ) > -----Original Message----- > From: scilab.browseruk.1ebb8b2ddb.tim#wescottdesign.com at ob.0sg.net > Sent: Thu, 31 Mar 2016 17:33:23 -0700 > To: users at lists.scilab.org > Subject: Re: [Scilab-users] Running an .sce from the command line. > message 9 (scilab: message 11 of 20) of 20) > > > > plot2d (a, b, logflag = "ln") > Look at help for plot2d for details. > > > Sent from my Verizon Wireless 4G LTE smartphone > > -------- Original message -------- > From: scilab.20.browseruk at xoxy.net > Date: 03/31/2016 4:38 PM (GMT-07:00) > To: users at lists.scilab.org > Subject: Re: [Scilab-users] Running an .sce from the command line. > message 9 > of 20) > > Samuel, > > Thanks. I had to do it in two steps: > > ??? f = gcf(); > ??? f.closerequestfcn="exit(0)"; > > otherwise I get: > > ??? gcf().closerequestfcn="exit(0)"; > ???????? !--error 2 > ??? Invalid factor. > > The focus still returns to the command line console pushing the graphics > window into the background and meaning I have to go looking for it to see > the plot; but when I close it the console exits back to the OS. > > Next problem, that should probably be a new thread: How to avoid the > Singularity of log function from preventing the script completing if the > data contains zeros? > > I'm doing: > > ??? plot( log10( a ), b ); > > To produce the log plot. > > > >> -----Original Message----- >> From: scilab.browseruk.bb30c473ec.sgougeon#free.fr at ob.0sg.net >> Sent: Thu, 31 Mar 2016 21:09:20 +0200 >> To: users at lists.scilab.org >> Subject: Re: [Scilab-users] Running an .sce from the command line. >> (scilab: message 9 of 20) >> >> Hello, >> >> Le 31/03/2016 20:35, scilab.20.browseruk at xoxy.net a ?crit : >>> Hi, >>> >>> I can run my .sce file which produces a graph from a file of data from >>> the (windows) command line using: >>> > >>????? scilex -f myscript.sce filename.rdat >>> >>> and that works except: >>> >>> Once the plot() executes and the graphic window appears, control and >>> focus returns to the interactive command line. >> Scilab's console, i guess not the shell terminal. >> >>> That's okay; but it'd would be really nice if the focus remained on the >>> graphic window until it was closed and then the scilab shell exited >>> automatically. >> Graphics are not modal: AFAIK it is not possible to lock the console >> with a figure until the figure is closed (or until any other event)(you >> could use a for loop waiting for an event ; but it won't reject CTRL-C >> interruptions). >> However, to close automatically Scilab when the figure is closed, you >> may add the following in your script: >> gcf().closerequestfcn="exit(0)"; >> >> HTH >> Samuel >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/manager > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/password-manager From sgougeon at free.fr Fri Apr 1 11:22:24 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 1 Apr 2016 11:22:24 +0200 Subject: [Scilab-users] Running an .sce from the command line. message 9 of 20) In-Reply-To: <97A89D95B36.00000045scilab.20.browseruk@xoxy.net> References: <950332e10de.0000093escilab.20.browseruk@xoxy.net> <97A89D95B36.00000045scilab.20.browseruk@xoxy.net> Message-ID: <56FE3DD0.3000702@free.fr> Hello, Le 01/04/2016 01:38, scilab.20.browseruk at xoxy.net a ?crit : > Samuel, > > Thanks. I had to do it in two steps: > > f = gcf(); > f.closerequestfcn="exit(0)"; . Yes, this works with Scilab 5 and Scilab 6. > otherwise I get: > > gcf().closerequestfcn="exit(0)"; > !--error 2 > Invalid factor. . Only since Scilab 6 > > The focus still returns to the command line console pushing the graphics window into the background and meaning I have to go looking for it to see the plot; Against this, you might use show_window(..) if it were not bugged. Since apparently it is a hard bug difficult to fix (documented since 2012 @ http://bugzilla.scilab.org/11363), you may use gcf().visible = "on" (or f = gcf(); f.visible = "on";) to bring the window to the foreground whether it is not iconified. > but when I close it the console exits back to the OS. > > Next problem, that should probably be a new thread: How to avoid the Singularity of log function from preventing the script completing if the data contains zeros? > > I'm doing: > > plot( log10( a ), b ); k = find(a>0); plot2d("ln",a(k),b(k)) Samuel From aweeks at hidglobal.com Fri Apr 1 10:36:41 2016 From: aweeks at hidglobal.com (aweeks at hidglobal.com) Date: Fri, 1 Apr 2016 09:36:41 +0100 Subject: [Scilab-users] Running an .sce from the command line. In-Reply-To: <950332E10DE.0000093Escilab.20.browseruk@xoxy.net> References: <950332E10DE.0000093Escilab.20.browseruk@xoxy.net> Message-ID: Hi, I don't know if this will be any help to you in this particular case but it may be of some interest. I was using Scilab to control some hardware and receive and display data coming back. The data was displayed in a graphics window and I then had to enter some commands to the Scilab console. The windows focus always ended up on the graphics window and I had to keep putting it back on the console using the mouse: the novelty of doing this quickly wore off. My PC at the time was running Windows XP and I had the following arrangement: In a folder, a file called "focusonwindow.vbs" containing these two lines: Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.AppActivate WScript.Arguments.Item(0) in the Scilab script the following line: host('cscript /B focusonwindow.vbs ""Scilab""') and here ""Scilab"" is the name of the window (the console) to which the focus should be switched. My current PC runs Windows 7 and I haven't got around to re-implementing the above yet but I imagine something similar will be possible. I don't take any credit for the above. At the time, I put a query on the forum (21 Feb. 2014) and received a reply offering this solution so I thank the gentleman who helped me. He suggested this webpage: http://stackoverflow.com/questions/786368/how-to-bring-a-cmd-exe-window-to-top Good luck, Adrian. Adrian Weeks Development Engineer, Hardware Engineering EMEA Office: +44 (0)2920 528500 | Desk: +44 (0)2920 528523 | Fax: +44 (0)2920 520178 aweeks at hidglobal.com Unit 3, Cae Gwyrdd, Green meadow Springs, Cardiff, UK, CF15 7AB. www.hidglobal.com From: scilab.20.browseruk at xoxy.net To: "users at lists.scilab.org" <> Date: 31/03/2016 19:37 Subject: [Scilab-users] Running an .sce from the command line. Sent by: "users" Hi, I can run my .sce file which produces a graph from a file of data from the (windows) command line using: scilex -f myscript.sce filename.rdat and that works except: Once the plot() executes and the graphic window appears, control and focus returns to the interactive command line. That's okay; but it'd would be really nice if the focus remained on the graphic window until it was closed and then the scilab shell exited automatically. Is it possible to arrange for that to happen? Thanks, Buk. ____________________________________________________________ TRY FREE IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if5 Capture screenshots, upload images, edit and send them to your friends through IMs, post on Twitter?, Facebook?, MySpace?, LinkedIn? ? FAST! _______________________________________________ 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/gif Size: 8425 bytes Desc: not available URL: From scilab.20.browseruk at xoxy.net Fri Apr 1 14:52:04 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Fri, 1 Apr 2016 04:52:04 -0800 Subject: [Scilab-users] Running an .sce from the command line. message 9 (scilab: to exclusive) of 20) In-Reply-To: <56FE3DD0.3000702@free.fr> References: <97a89d95b36.00000045scilab.20.browseruk@xoxy.net> <950332e10de.0000093escilab.20.browseruk@xoxy.net> Message-ID: <9E95EF53318.000003E6scilab.20.browseruk@xoxy.net> > Set WshShell = WScript.CreateObject("WScript.Shell") > WshShell.AppActivate WScript.Arguments.Item(0) Adrian. Thanks. That would probably work; except I long ago disabled cscript/jscript/vbscript on my system for security reasons. I'm not sure I'd remember now how to re-enable it. (Nor that I would want to; but that's my paranoia :) > you may use f = gcf(); f.visible = "on"; > to bring the window to the foreground whether it is not iconified. Samuel, I tried the above, but it made no difference. The problem is not that the window is iconified; just that when the script completes and control returns to the scilab shell, its console widow is brought to the front and so the graphics window get hidden by it. However, you mentioned using a loop (earlier) and that triggered a thought and lead to a solution. while(1) sleep(100), end; It simply prevents the script ending so the graphics window stays on top; but the script remains responsive so that when I close the graphics window, your f.closerequestfcn = "exit(0)"; kicks in and terminates the whole thing. And that's nearly perfect. I run this from the command line: "C:\Program Files\scilab-5.5.2\bin\SciLex.exe" -noatomsautoload -f graphRdat.sce *.rdat The script loads up all the .rdat files in the cwd, graphs the data inside, and leaves the graph on top for my perusal. When I'm done, I close the graph and I get returned to the command lien where I ran the command. ---------- So then I thought I could go one step further. I redefined the standard file associations as follows: C:\>assoc .sce .sce=Scilab5.sce C:\>ftype Scilab5.sce Scilab5.sce="C:\Program Files\scilab-5.5.2\bin\wscilex.exe" -O "%1" C:\Motor>ftype Scilab5.sce="C:\Program Files\scilab-5.5.2\bin\scilex.exe" -nb -noatomsautoload -f "%1" %* Scilab5.sce="C:\Program Files\scilab-5.5.2\bin\scilex.exe" -nb -noatomsautoload -f "%1" %* C:\>set pathext=.pl;.COM;.EXE;.BAT;.CMD;.PY;.PYW;.SCE; so that I could just type: C:\>graphRdat *.rdat and that invokes the script, draws the graphs, waits for me to close the window and exits back to the command prompt. Perfect! Now all I need to resolve is my problem with setting the colors for plot2d() so that I can get nice logplot axis and I'm done. Thanks all. ____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! Check it out at http://www.inbox.com/earth From scilab.20.browseruk at xoxy.net Fri Apr 1 17:22:20 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Fri, 1 Apr 2016 07:22:20 -0800 Subject: [Scilab-users] Running an .sce from the command line. message 9 (scilab: to exclusive) (scilab: to exclusive) of 20) In-Reply-To: <9E95EF53318.000003E6scilab.20.browseruk@xoxy.net> References: <56fe3dd0.3000702@free.fr> <97a89d95b36.00000045scilab.20.browseruk@xoxy.net> <950332e10de.0000093escilab.20.browseruk@xoxy.net> Message-ID: <9FE5CC41950.00000532scilab.20.browseruk@xoxy.net> > > Now all I need to resolve is my problem with setting the colors for > plot2d() so that I can get nice logplot axis and I'm done. > Responding to myself may not be the done thing here; but I just realised that color( r,g,b ); needs r,g,b as 0 -> 255 rather o -> 1 as used some other places; and that's fixed my final problem. (For now :) Cheers, Buk. ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/manager From tim at wescottdesign.com Fri Apr 1 19:35:37 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Fri, 01 Apr 2016 10:35:37 -0700 Subject: [Scilab-users] Running an .sce from the command line. message 9 (scilab: message 11 of 20) of 20) In-Reply-To: <985623E5A5C.00000096scilab.20.browseruk@xoxy.net> References: <985623E5A5C.00000096scilab.20.browseruk@xoxy.net> Message-ID: <1459532137.2711.30.camel@Servo> >From it's behavior, plot2d treats log(0) as a null point, or as a point that's "way down there". I don't know the details, but it's apparent when you plot it (and it works). plot2d, as you've found, treats colors differently than plot. "plot" is sort of the Matlab-ish way of doing things, while plot2d is native Scilab. Normally you just set the colors with a "style" statement; if you want fine control over line colors then read up on "colormap" in the help system. There's a Matlab log-log plot style -- I think it's loglog, semilogx and semilogy. If you want to stick with Matlab style plotting you can investigate these -- but I don't use 'em, so I can make no promises. On Thu, 2016-03-31 at 16:56 -0800, scilab.20.browseruk at xoxy.net wrote: > Tim, > > I've implemented that, and it certainly avoids the singularity; but creates other problems. > > For example: To choose the colors for successive plots, I set up a list: > > rgb = list( [0,0,0], [1,0,0], [0,1,0], [0,0,1], ... ); > > and supplied the color to plot using: > > for i = 1:size( files, 'r' ) > [ H, tH ] = fscanfMat( files(i), "%lg" ); > ... > plot( a, b, 'color', rgb(i) ) > end > > but plot2d() requires a *color index* > > So (after trying a bunch of other things) I came up with: > > rgb = list( color(0,0,0), color(1,0,0), color(0,1,0), color(0,0,1), ... ); > > for i = 1:size( files, 'r' ) > [ H, tH ] = fscanfMat( files(i), "%lg" ); > ... > plot2d( 'ln', a, b, style = [ rgb(i) ] ); > end > > which compiles and runs without error, but draws everything in black? > > I need a logflag parameter for plot(); or a sane color(rgb) option for plot2d()? > > Alternatively, insight to whatever magic/error trapping/error control that the plot2d( 'nl' ) flag uses to avoid the singularity problem? > > Cheers, Buk. > > (BTW: I enjoyed reading the bits of your book you pointed me at; and (with your permission) I might ask for a little 'advice' off-list on the subject of friction: aluminium on teflon and the problems of 'creep'. Be warned before you agree. I know next to nothing about friction! ) > > > > -----Original Message----- > > From: scilab.browseruk.1ebb8b2ddb.tim#wescottdesign.com at ob.0sg.net > > Sent: Thu, 31 Mar 2016 17:33:23 -0700 > > To: users at lists.scilab.org > > Subject: Re: [Scilab-users] Running an .sce from the command line. > > message 9 (scilab: message 11 of 20) of 20) > > > > > > > > plot2d (a, b, logflag = "ln") > > Look at help for plot2d for details. > > > > > > Sent from my Verizon Wireless 4G LTE smartphone > > > > -------- Original message -------- > > From: scilab.20.browseruk at xoxy.net > > Date: 03/31/2016 4:38 PM (GMT-07:00) > > To: users at lists.scilab.org > > Subject: Re: [Scilab-users] Running an .sce from the command line. > > message 9 > > of 20) > > > > Samuel, > > > > Thanks. I had to do it in two steps: > > > > f = gcf(); > > f.closerequestfcn="exit(0)"; > > > > otherwise I get: > > > > gcf().closerequestfcn="exit(0)"; > > !--error 2 > > Invalid factor. > > > > The focus still returns to the command line console pushing the graphics > > window into the background and meaning I have to go looking for it to see > > the plot; but when I close it the console exits back to the OS. > > > > Next problem, that should probably be a new thread: How to avoid the > > Singularity of log function from preventing the script completing if the > > data contains zeros? > > > > I'm doing: > > > > plot( log10( a ), b ); > > > > To produce the log plot. > > > > > > > >> -----Original Message----- > >> From: scilab.browseruk.bb30c473ec.sgougeon#free.fr at ob.0sg.net > >> Sent: Thu, 31 Mar 2016 21:09:20 +0200 > >> To: users at lists.scilab.org > >> Subject: Re: [Scilab-users] Running an .sce from the command line. > >> (scilab: message 9 of 20) > >> > >> Hello, > >> > >> Le 31/03/2016 20:35, scilab.20.browseruk at xoxy.net a ?crit : > >>> Hi, > >>> > >>> I can run my .sce file which produces a graph from a file of data from > >>> the (windows) command line using: > >>> > > >> scilex -f myscript.sce filename.rdat > >>> > >>> and that works except: > >>> > >>> Once the plot() executes and the graphic window appears, control and > >>> focus returns to the interactive command line. > >> Scilab's console, i guess not the shell terminal. > >> > >>> That's okay; but it'd would be really nice if the focus remained on the > >>> graphic window until it was closed and then the scilab shell exited > >>> automatically. > >> Graphics are not modal: AFAIK it is not possible to lock the console > >> with a figure until the figure is closed (or until any other event)(you > >> could use a for loop waiting for an event ; but it won't reject CTRL-C > >> interruptions). > >> However, to close automatically Scilab when the figure is closed, you > >> may add the following in your script: > >> gcf().closerequestfcn="exit(0)"; > >> > >> HTH > >> Samuel > >> > >> _______________________________________________ > >> users mailing list > >> users at lists.scilab.org > >> http://lists.scilab.org/mailman/listinfo/users > > > > ____________________________________________________________ > > Can't remember your password? Do you need a strong and secure password? > > Use Password manager! It stores your passwords & protects your account. > > Check it out at http://mysecurelogon.com/manager > > > > > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/password-manager > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From marek.havrilla at gmail.com Fri Apr 1 20:41:47 2016 From: marek.havrilla at gmail.com (laftek) Date: Fri, 1 Apr 2016 11:41:47 -0700 (MST) Subject: [Scilab-users] Phase shift and step size - electrical (XCOS) In-Reply-To: <56F0680D.2040507@gmail.com> References: <1458594914582-4033797.post@n3.nabble.com> <56F0680D.2040507@gmail.com> Message-ID: <1459536107077-4033886.post@n3.nabble.com> Hi there. I see nobody is responding. Could somebody at least help me with step size ? Is there any chance I can set it manually ? This is what I mean. Could you help with Singularity in a block either? If I use mathematical operator : multiplication I am getting error : Singularity in a block. But if I use instead this one I am not longer getting singularity problem. Is there some workaround for division block ? I tried to use PROD_f with u^-1 or 1/u but nothing works. I really need it Thanks ! -- View this message in context: http://mailinglists.scilab.org/Phase-shift-and-step-size-in-XCOS-electrical-tp4033797p4033886.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From acj119 at nifty.com Sat Apr 2 08:06:07 2016 From: acj119 at nifty.com (jaipur) Date: Fri, 1 Apr 2016 23:06:07 -0700 (MST) Subject: [Scilab-users] scilab 6.0.0-beta-1 on Mac OS X El Capitan Message-ID: <1459577167720-4033887.post@n3.nabble.com> I installed scilab 6.0.0-beta-1 on Mac OS X El Capitan ver.10.11.4. I double-click "scilab 6.0.0-beta-1.app" icon in Application folder, then, the icon flashed but nothing happened. scilab 6.0.0-beta-1 does not work on Mac OS X El Capitan? My scilab-5.5.2 does work on same machine. -- View this message in context: http://mailinglists.scilab.org/scilab-6-0-0-beta-1-on-Mac-OS-X-El-Capitan-tp4033887.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From scilab.20.browseruk at xoxy.net Sat Apr 2 15:19:14 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Sat, 2 Apr 2016 05:19:14 -0800 Subject: [Scilab-users] Converting the result of strchr() to a boolean test? Message-ID: Hi, I wan't to check a string for the presence of a particular character, which strchr() does perfectly: -->strchr( 'fred', 'r' ) ans = red -->strchr( 'fred', 'b' ) ans = But then I want to take some action based on the result, and my attempts to use strchr() as a boolean fail: ->if strchr( 'fred', 'r' ), then disp( 'found' ), else disp( 'not found' ), end; !--error 44 Wrong first argument. Wrong first argument to what?? Thanks, Buk. ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! From sgougeon at free.fr Sat Apr 2 15:28:20 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 2 Apr 2016 15:28:20 +0200 Subject: [Scilab-users] Converting the result of strchr() to a boolean test? In-Reply-To: References: Message-ID: <56FFC8F4.1030002@free.fr> Hello, Le 02/04/2016 15:19, scilab.20.browseruk at xoxy.net a ?crit : > I wan't to check a string for the presence of a particular character, which strchr() does perfectly: > > -->strchr( 'fred', 'r' ) > ans = > red It is not really strchr() 's purpose, rather the grep() one: if grep('fred','r') ~= [] disp("found") else disp("not found") end Samuel From mjmccann at ieee.org Sat Apr 2 15:49:21 2016 From: mjmccann at ieee.org (Michael J McCann) Date: Sat, 2 Apr 2016 13:49:21 +0000 Subject: [Scilab-users] Phase shift and step size - electrical (XCOS) In-Reply-To: <1459536107077-4033886.post@n3.nabble.com> References: <1458594914582-4033797.post@n3.nabble.com> <56F0680D.2040507@gmail.com> <1459536107077-4033886.post@n3.nabble.com> Message-ID: <56FFCDE1.2000500@ieee.org> I mostly use Matlab and Simulink or my own software but I can see that in Xcos I can define parameters that control parameters inside the blocks. The Simulation menu item in Xcos has the option to define the integration method and there are some choices you can make about maximum stepsize for Runge Kutta, which is basically a fixed step approach but they may be embedding it in a variable step size environment so it will make adjustments (to smaller steps). There is within the [Simulation] item a [Set Context] option that allows you to deliver numeric values into the simulation as well. Also, I suspect that if you specify a clock to drive the sampling of a "scope" you can implicitly define a maximum step size. With regard to the operations of multiply and divide I'd say "be careful" because a division is a strange thing to have in a real physical system so I'd be looking at your understanding of the system you were modelling and ask why it appears at all. Hope this helps Mike McCann www.mccannscience.com/mcsimapn.htm ============================================ On 01/04/2016 18:41, laftek wrote: > Hi there. I see nobody is responding. Could somebody at least help me with > step size ? Is there any chance I can set it manually ? This is what I mean. > > > > > Could you help with Singularity in a block either? If I use mathematical > operator : multiplication > > I am getting error : Singularity in a block. But if I use instead this one > > I am not longer getting singularity problem. Is there some workaround for > division block ? I tried to use PROD_f with u^-1 or 1/u but nothing works. I > really need it > > Thanks ! > > > > -- > View this message in context: http://mailinglists.scilab.org/Phase-shift-and-step-size-in-XCOS-electrical-tp4033797p4033886.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From scilab.20.browseruk at xoxy.net Sat Apr 2 16:05:42 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Sat, 2 Apr 2016 06:05:42 -0800 Subject: [Scilab-users] Converting the result of strchr() to a boolean (scilab: to exclusive) test? In-Reply-To: <56FFC8F4.1030002@free.fr> References: Message-ID: Thanks Samuel. (Glad there's someone else around on the weekend.) I would never have thought to look at grep() for this purpose. One of my most used languages (Perl) also has a built-in called grep(), but it serves a quite different purpose there. But, it does raise another question that has been on the back of my mind. The raw data I'm graphing is raw magnetic curve (BH curve) data, that generically look something like this: http://www.material-sys.com/image/product/b-hHysteresisCurveEn.png Ie. It contains values describing the rise from 0,0 to point a, then the full hysteresis loop a -> d -> a. I want to be able to plot only the initial magnetisation curve (0,0 -> a); and at the moment I've opted for a crude selection mechanism of: [ m, k2 ] = max( b ); [ m, k1 ] = max( h ); k = min( k1, k2 ); h = h( 1:k ); b = b( 1:k ); That is, find the index of the maximum value of both vectors, choose the lowest of the two maximums and then subset both vectors accordingly. That works reasonably well, but not for all curves. What I think would be a better selection criteria is to consider the points in successive pairs and set the cut-off whenever either coordinate ceases to be strictly increasing. In Perl I would use a (library) function called reduce() for that. In Haskell I think it is called fold() (foldr() or foldl() ). How would you go about that in SciLab? Cheers, Buk. > -----Original Message----- > From: scilab.browseruk.bb30c473ec.sgougeon#free.fr at ob.0sg.net > Sent: Sat, 2 Apr 2016 15:28:20 +0200 > To: users at lists.scilab.org > Subject: Re: [Scilab-users] Converting the result of strchr() to a > boolean (scilab: to exclusive) test? > > Hello, > > Le 02/04/2016 15:19, scilab.20.browseruk at xoxy.net a ?crit : >> I wan't to check a string for the presence of a particular character, >> which strchr() does perfectly: >> >> -->strchr( 'fred', 'r' ) >> ans = >> red > It is not really strchr() 's purpose, rather the grep() one: > > if grep('fred','r') ~= [] > disp("found") > else > disp("not found") > end > > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users ____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop! Check it out at http://www.inbox.com/marineaquarium From sgougeon at free.fr Sat Apr 2 16:41:11 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 2 Apr 2016 16:41:11 +0200 Subject: [Scilab-users] Converting the result of strchr() to a boolean (scilab: to exclusive) test? In-Reply-To: References: Message-ID: <56FFDA07.7080003@free.fr> Le 02/04/2016 16:05, scilab.20.browseruk at xoxy.net a ?crit : > .../... > What I think would be a better selection criteria is to consider the points in successive pairs and set the cut-off whenever either coordinate ceases to be strictly increasing. . Yes, i would do this as well, in that way: i = min(find((h(2:$)-h(1:$-1))<=0)) plot(h(1:i), b(1:i)) gce().children.polyline_style = 4; From cederholm.peter at gmail.com Sun Apr 3 08:13:11 2016 From: cederholm.peter at gmail.com (cederholm) Date: Sat, 2 Apr 2016 23:13:11 -0700 (MST) Subject: [Scilab-users] scilab 6.0.0-beta-1 on Mac OS X El Capitan In-Reply-To: <1459577167720-4033887.post@n3.nabble.com> References: <1459577167720-4033887.post@n3.nabble.com> Message-ID: <1459663991628-4033892.post@n3.nabble.com> Hi I experience exactly the same - and I don't have a solution. However, looking at the Scilab 6.0.0 system requirements page [http://www.scilab.org/download/requirements_6.0] you will see that Mac OS X El Capitan is not mentioned. Peter -- View this message in context: http://mailinglists.scilab.org/scilab-6-0-0-beta-1-on-Mac-OS-X-El-Capitan-tp4033887p4033892.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From acj119 at nifty.com Sun Apr 3 15:04:03 2016 From: acj119 at nifty.com (jaipur) Date: Sun, 3 Apr 2016 06:04:03 -0700 (MST) Subject: [Scilab-users] scilab 6.0.0-beta-1 on Mac OS X El Capitan In-Reply-To: <1459663991628-4033892.post@n3.nabble.com> References: <1459577167720-4033887.post@n3.nabble.com> <1459663991628-4033892.post@n3.nabble.com> Message-ID: <1459688643311-4033893.post@n3.nabble.com> Thank you. I understand that scilab 6.0.0-beta-1 does not support Mac OS X El Capitan. -- View this message in context: http://mailinglists.scilab.org/scilab-6-0-0-beta-1-on-Mac-OS-X-El-Capitan-tp4033887p4033893.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From scilab.20.browseruk at xoxy.net Sun Apr 3 21:09:25 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Sun, 3 Apr 2016 11:09:25 -0800 Subject: [Scilab-users] "Smoothing" very localised discontinuities in curves. Message-ID: HI, The data I'm dealing with is experimentally produced; and thus contains occasional, localised discontinuities (inflections), that I need to remove before that data is suitable for is use in FEM modeling software, which requires that it be strictly monotonic. The attachment shows the full curve plus a close up of a couple of examples of the type of discontinuity I need to deal with. I haven't yet decided whether to simply omit points (thus connect A to F & G to J) or whether to retain the same number of points by interpolating new points onto that line as shown in red. I've looked and played several of the smoothing, convolution and interpolation routines that scilab provides, but (besides that I don't understand the output some of them produce) they also seem to affect the data more than I would like. Some seem to introduce a 'phase shift'; others smooth out larger scale bumps in the curve that need to be retained; and others generate many extra points which I don't think is helpful, the FEM software is going to do its own interpolations anyway. But the bit I'm asking about here is how to detect point A&F and G&J? Any thoughts or pointers as to a) the algorithm to use; b) how to implement it in SciLab? Cheers, Buk. ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/password-manager -------------- next part -------------- A non-text attachment was scrubbed... Name: discontiniuties.png Type: image/png Size: 70124 bytes Desc: not available URL: From cfuttrup at gmail.com Mon Apr 4 07:47:37 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 4 Apr 2016 07:47:37 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in curves. In-Reply-To: References: Message-ID: <5701FFF9.90706@gmail.com> Hi Buk When data goes zig-zag like that, I'm sometimes successful with a Bartlett (triangular) smoothing window of only very few points (like 3 points). // function [out]=bartlett3p(indata) // for smoothing (when plotting) // out = indata; // if length(indata)>2 then // out(2:$-1) = 0.25*indata(1:$-2) + 0.5*indata(2:$-1) + 0.25*indata(3:$); // end // Bartlett Window = Triangular window endfunction Yes, it will affect your data, probably introduce phase shifts. Best regards, Claus On 03-04-2016 21:09, scilab.20.browseruk at xoxy.net wrote: > HI, > > The data I'm dealing with is experimentally produced; and thus contains occasional, localised discontinuities (inflections), that I need to remove before that data is suitable for is use in FEM modeling software, which requires that it be strictly monotonic. The attachment shows the full curve plus a close up of a couple of examples of the type of discontinuity I need to deal with. > > I haven't yet decided whether to simply omit points (thus connect A to F & G to J) or whether to retain the same number of points by interpolating new points onto that line as shown in red. > > I've looked and played several of the smoothing, convolution and interpolation routines that scilab provides, but (besides that I don't understand the output some of them produce) they also seem to affect the data more than I would like. Some seem to introduce a 'phase shift'; others smooth out larger scale bumps in the curve that need to be retained; and others generate many extra points which I don't think is helpful, the FEM software is going to do its own interpolations anyway. > > > But the bit I'm asking about here is how to detect point A&F and G&J? > > Any thoughts or pointers as to a) the algorithm to use; b) how to implement it in SciLab? > > Cheers, Buk. > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/password-manager > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Mon Apr 4 07:57:11 2016 From: tim at wescottdesign.com (tim at wescottdesign.com) Date: Sun, 03 Apr 2016 22:57:11 -0700 Subject: [Scilab-users] "Smoothing" very localised discontinuities in curves. In-Reply-To: <5701FFF9.90706@gmail.com> References: <5701FFF9.90706@gmail.com> Message-ID: <2028aeda3d79e3cda9476440d8ca6dd9@wescottdesign.com> As written (with or without the commenting out) that code won't produce phase shifts. In technical terms it's a FIR filter that is symmetrical around zero delay, and such filters do not introduce phase shifts. On 2016-04-03 22:47, Claus Futtrup wrote: > Hi Buk > > When data goes zig-zag like that, I'm sometimes successful with a Bartlett (triangular) smoothing window of only very few points (like 3 points). > > // function [out]=bartlett3p(indata) // for smoothing (when plotting) > // out = indata; > // if length(indata)>2 then > // out(2:$-1) = 0.25*indata(1:$-2) + 0.5*indata(2:$-1) + 0.25*indata(3:$); > // end // Bartlett Window = Triangular window > endfunction > > Yes, it will affect your data, probably introduce phase shifts. > > Best regards, > Claus > > On 03-04-2016 21:09, scilab.20.browseruk at xoxy.net wrote: > >> HI, >> >> The data I'm dealing with is experimentally produced; and thus contains occasional, localised discontinuities (inflections), that I need to remove before that data is suitable for is use in FEM modeling software, which requires that it be strictly monotonic. The attachment shows the full curve plus a close up of a couple of examples of the type of discontinuity I need to deal with. >> >> I haven't yet decided whether to simply omit points (thus connect A to F & G to J) or whether to retain the same number of points by interpolating new points onto that line as shown in red. >> >> I've looked and played several of the smoothing, convolution and interpolation routines that scilab provides, but (besides that I don't understand the output some of them produce) they also seem to affect the data more than I would like. Some seem to introduce a 'phase shift'; others smooth out larger scale bumps in the curve that need to be retained; and others generate many extra points which I don't think is helpful, the FEM software is going to do its own interpolations anyway. >> >> But the bit I'm asking about here is how to detect point A&F and G&J? >> >> Any thoughts or pointers as to a) the algorithm to use; b) how to implement it in SciLab? >> >> Cheers, Buk. >> >> ____________________________________________________________ >> Can't remember your password? Do you need a strong and secure password? >> Use Password manager! It stores your passwords & protects your account. >> Check it out at http://mysecurelogon.com/password-manager [1] >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users [2] > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users [2] Links: ------ [1] http://mysecurelogon.com/password-manager [2] http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Mon Apr 4 08:09:40 2016 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Mon, 4 Apr 2016 08:09:40 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in curves. In-Reply-To: <2028aeda3d79e3cda9476440d8ca6dd9@wescottdesign.com> References: <5701FFF9.90706@gmail.com> <2028aeda3d79e3cda9476440d8ca6dd9@wescottdesign.com> Message-ID: <4ABBE5FC-D253-42B2-8BD3-D8718C16DC7A@utc.fr> Why not use median filtering with a small window ? > Le 4 avr. 2016 ? 07:57, tim at wescottdesign.com a ?crit : > > As written (with or without the commenting out) that code won't produce phase shifts. In technical terms it's a FIR filter that is symmetrical around zero delay, and such filters do not introduce phase shifts. > > > >> On 2016-04-03 22:47, Claus Futtrup wrote: >> >> Hi Buk >> >> When data goes zig-zag like that, I'm sometimes successful with a Bartlett (triangular) smoothing window of only very few points (like 3 points). >> >> // function [out]=bartlett3p(indata) // for smoothing (when plotting) >> // out = indata; >> // if length(indata)>2 then >> // out(2:$-1) = 0.25*indata(1:$-2) + 0.5*indata(2:$-1) + 0.25*indata(3:$); >> // end // Bartlett Window = Triangular window >> endfunction >> >> Yes, it will affect your data, probably introduce phase shifts. >> >> Best regards, >> Claus >> >>> On 03-04-2016 21:09, scilab.20.browseruk at xoxy.net wrote: >>> HI, >>> >>> The data I'm dealing with is experimentally produced; and thus contains occasional, localised discontinuities (inflections), that I need to remove before that data is suitable for is use in FEM modeling software, which requires that it be strictly monotonic. The attachment shows the full curve plus a close up of a couple of examples of the type of discontinuity I need to deal with. >>> >>> I haven't yet decided whether to simply omit points (thus connect A to F & G to J) or whether to retain the same number of points by interpolating new points onto that line as shown in red. >>> >>> I've looked and played several of the smoothing, convolution and interpolation routines that scilab provides, but (besides that I don't understand the output some of them produce) they also seem to affect the data more than I would like. Some seem to introduce a 'phase shift'; others smooth out larger scale bumps in the curve that need to be retained; and others generate many extra points which I don't think is helpful, the FEM software is going to do its own interpolations anyway. >>> >>> >>> But the bit I'm asking about here is how to detect point A&F and G&J? >>> >>> Any thoughts or pointers as to a) the algorithm to use; b) how to implement it in SciLab? >>> >>> Cheers, Buk. >>> >>> ____________________________________________________________ >>> Can't remember your password? Do you need a strong and secure password? >>> Use Password manager! It stores your passwords & protects your account. >>> Check it out at http://mysecurelogon.com/password-manager >>> >>> >>> _______________________________________________ >>> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Mon Apr 4 08:12:34 2016 From: tim at wescottdesign.com (tim at wescottdesign.com) Date: Sun, 03 Apr 2016 23:12:34 -0700 Subject: [Scilab-users] "Smoothing" very localised discontinuities in curves. In-Reply-To: References: Message-ID: <1bfd3f0ddffa0b82e28b9602484a217c@wescottdesign.com> If your FEM software can't handle non-monotonic data, can it handle noisy data? I'm taking "smoothing" to mean "filtering" here. In general the filtering problem is to decide on the characteristics of your desired signal, the characteristics of your noise, and then make some mathematical transformation that minimizes the effects of anything with noise-like characteristics while retaining as much of anything with desired-signal-like characteristics. This has two salient corollaries: first, you have to know what the characteristics of your signal and noise are; and second, the more that your signal resembles your noise, the less of it you will be able to recover. You can spin off from there in a number of different directions, leading you to a number of different filtering techniques. It appears that you're doing your measurements by varying some controlled parameter along the vertical axis and measuring along the horizontal axis. If this is the case, then I would start by trying filtering techniques using the vertical axis as your "time" axis. There is no linear filtering technique (i.e., output sample = weighted some of a vector of input samples) that you can use that guarantees monotonicity for all possible inputs. If you use linear filtering then you need to verify monotonicity by experiment. If your FEC program is messed up by noise as much as non-monotonicity, then this is not a bad thing -- it's just an indication that you're filtering heavily enough. If the problem really, truly is monotonicity, then take the derivative at each point, and snip out the points that go the wrong direction. I suspect this won't lead to joy, but it'll meet your stated objectives. If the problem with the smoothing filters that you've tried is that it works well in some spots and not in others, then consider using a filter whose properties vary depending on where on the axis your output sample is located. This isn't something that you'll find pre-packaged -- you'll have to whomp something up using more primitive functions of Scilab. I could go on and on -- sorry for coming to a disorganized end here, but I hope I'm giving you some food for thought. On 2016-04-03 12:09, scilab.20.browseruk at xoxy.net wrote: > HI, > > The data I'm dealing with is experimentally produced; and thus > contains occasional, localised discontinuities (inflections), that I > need to remove before that data is suitable for is use in FEM modeling > software, which requires that it be strictly monotonic. The attachment > shows the full curve plus a close up of a couple of examples of the > type of discontinuity I need to deal with. > > I haven't yet decided whether to simply omit points (thus connect A to > F & G to J) or whether to retain the same number of points by > interpolating new points onto that line as shown in red. > > I've looked and played several of the smoothing, convolution and > interpolation routines that scilab provides, but (besides that I don't > understand the output some of them produce) they also seem to affect > the data more than I would like. Some seem to introduce a 'phase > shift'; others smooth out larger scale bumps in the curve that need to > be retained; and others generate many extra points which I don't think > is helpful, the FEM software is going to do its own interpolations > anyway. > > > But the bit I'm asking about here is how to detect point A&F and G&J? > > Any thoughts or pointers as to a) the algorithm to use; b) how to > implement it in SciLab? > > Cheers, Buk. > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/password-manager > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From amonmayr at laas.fr Mon Apr 4 08:55:49 2016 From: amonmayr at laas.fr (amonmayr at laas.fr) Date: Mon, 4 Apr 2016 08:55:49 +0200 Subject: [Scilab-users] Spinner control with non-linear step? In-Reply-To: <91051797441.000005C5scilab.20.browseruk@xoxy.net> References: <91051797441.000005C5scilab.20.browseruk@xoxy.net> Message-ID: <57020FF5.1080405@laas.fr> Le 03/31/2016 12:58 PM, scilab.20.browseruk at xoxy.net a ?crit : > Onward and upward thanks to Antoine. > > I'd like to have a spinner uicontrol where the steps are non-linear. > > Eg. logarithmic: -10^3, -10^2, -10^1, -10^0 -10^-1, -10-2, -10^-3, 0, 10^-3, 10^-2, 10^-1, 10^0, 10^1, 10^2, 10^3 Well, you can always use the "linear" values of the spinner as the input of a function to generate your non-linear function. For example something like: SpinnerValue=hspinner.value; NLValue=10^Spinnervalue; To get an exponential scale out of the Spinner value. Is this something like that you want to achieve? Antoine > > Is it possible to supply a function or vector for the SliderStep property? > > Any suggestions for a way to achieve teh goal? > > Thanks Buk. > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/manager > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From clement.david at scilab-enterprises.com Mon Apr 4 09:40:53 2016 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Mon, 04 Apr 2016 09:40:53 +0200 Subject: [Scilab-users] scilab 6.0.0-beta-1 on Mac OS X El Capitan In-Reply-To: <1459688643311-4033893.post@n3.nabble.com> References: <1459577167720-4033887.post@n3.nabble.com> <1459663991628-4033892.post@n3.nabble.com> <1459688643311-4033893.post@n3.nabble.com> Message-ID: <1459755653.25972.14.camel@scilab-enterprises.com> Hello, I guess there might be a bug on that support. You can add yourself to the CC list on the bugzilla interface to be alerted on change. -- Cl?ment Le dimanche 03 avril 2016 ? 06:04 -0700, jaipur a ?crit?: > Thank you. > I understand that scilab 6.0.0-beta-1 does not support Mac OS X El Capitan. > > > > > -- > View this message in context: http://mailinglists.scilab.org/scilab-6-0-0-beta-1-on-Mac-OS-X-El-Ca > pitan-tp4033887p4033893.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 jrafaelbguerra at hotmail.com Mon Apr 4 11:20:13 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 4 Apr 2016 11:20:13 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in curves. In-Reply-To: References: Message-ID: Hi Buk. Have you tried Scilab's cubic splines using the "monotone" option? Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of scilab.20.browseruk at xoxy.net Sent: Sunday, April 03, 2016 9:09 PM To: users at lists.scilab.org Subject: [Scilab-users] "Smoothing" very localised discontinuities in curves. HI, The data I'm dealing with is experimentally produced; and thus contains occasional, localised discontinuities (inflections), that I need to remove before that data is suitable for is use in FEM modeling software, which requires that it be strictly monotonic. The attachment shows the full curve plus a close up of a couple of examples of the type of discontinuity I need to deal with. I haven't yet decided whether to simply omit points (thus connect A to F & G to J) or whether to retain the same number of points by interpolating new points onto that line as shown in red. I've looked and played several of the smoothing, convolution and interpolation routines that scilab provides, but (besides that I don't understand the output some of them produce) they also seem to affect the data more than I would like. Some seem to introduce a 'phase shift'; others smooth out larger scale bumps in the curve that need to be retained; and others generate many extra points which I don't think is helpful, the FEM software is going to do its own interpolations anyway. But the bit I'm asking about here is how to detect point A&F and G&J? Any thoughts or pointers as to a) the algorithm to use; b) how to implement it in SciLab? Cheers, Buk. ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/password-manager From scilab.20.browseruk at xoxy.net Mon Apr 4 13:04:53 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 4 Apr 2016 03:04:53 -0800 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: Yes. C:\Motor>graphRdat T HB1M_Core25_No_Field_No_Epoxy_800Am.rdat s = splin( h', b', 'monotone' ); !--error 999 splin: Wrong value for input argument #1: Not (strictly) increasing or +-inf detected. at line 22 of exec file called by : Since there are no inf values in the data; that kind of implies that it requires monotonic input in order to produce monotonic output; which ain't so useful. That said, I get that same error message whichever variation of the splin() function I try.... Which suggests there's something wrong with my data, but that stupid cos the data is real. The math has to adapt to the data not the other way around. > -----Original Message----- > From: scilab.browseruk.b28bd2e902.jrafaelbguerra#hotmail.com at ob.0sg.net > Sent: Mon, 4 Apr 2016 11:20:13 +0200 > To: users at lists.scilab.org > Subject: Re: [Scilab-users] "Smoothing" very localised discontinuities in > (scilab: to exclusive) curves. > > Hi Buk. > > Have you tried Scilab's cubic splines using the "monotone" option? > > Regards, > Rafael > > -----Original Message----- > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of > scilab.20.browseruk at xoxy.net > Sent: Sunday, April 03, 2016 9:09 PM > To: users at lists.scilab.org > Subject: [Scilab-users] "Smoothing" very localised discontinuities in > curves. > > HI, > > The data I'm dealing with is experimentally produced; and thus contains > occasional, localised discontinuities (inflections), that I need to > remove > before that data is suitable for is use in FEM modeling software, which > requires > that it be strictly monotonic. The attachment shows the full curve plus a > close > up of a couple of examples of the type of discontinuity I need to deal > with. > > I haven't yet decided whether to simply omit points (thus connect A to F > & G to > J) or whether to retain the same number of points by interpolating new > points > onto that line as shown in red. > > I've looked and played several of the smoothing, convolution and > interpolation > routines that scilab provides, but (besides that I don't understand the > output > some of them produce) they also seem to affect the data more than I would > like. > Some seem to introduce a 'phase shift'; others smooth out larger scale > bumps in > the curve that need to be retained; and others generate many extra points > which > I don't think is helpful, the FEM software is going to do its own > interpolations > anyway. > > > But the bit I'm asking about here is how to detect point A&F and G&J? > > Any thoughts or pointers as to a) the algorithm to use; b) how to > implement it > in SciLab? > > Cheers, Buk. > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/password-manager > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! From jrafaelbguerra at hotmail.com Mon Apr 4 14:58:47 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 4 Apr 2016 14:58:47 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) curves. References: Message-ID: If your data is not recorded in real-time, you can sort it (along the x-axis) and this does not imply that the "y(x) function" will become monotonous. See below. As suggested, by Stephane Mottelet, see one 3-point median filter solution below applied to data similar to yours: M = [1.0 -0.2; 1.4 0.0; 2.1 0.2; 1.7 0.45; 2.45 0.5; 2.95 0.6; 2.5 0.75; 3.0 0.8; 3.3 1.2]; x0 = M(:,1); y0 = M(:,2); clf(); plot2d(x0,[y0 y0],style=[5 -9]); [x,ix] = gsort(x0,'g','i'); // sorting input x-axis y = y0(ix); k =1; // median filter half-lenght n = length(x); x(2:n+1)=x; y(2:n+1)=y; x(1)=x(2); y(1)=y(2); x(n+2)=x(n+1); y(n+2)=y(n+1); n = length(x); for j = 1:n j1 = max(1,j-k); j2 = min(n,j+k); ym(j) = median(y(j1:j2)); end plot2d(x,ym+5e-3,style=[3],leg="3-point median filtering@"); // shift for display purposes This gets rid of obvious outliers but does not guarantee a monotonous output (idem for the more robust LOWESS technique, that can be googled). Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of scilab.20.browseruk at xoxy.net Sent: Monday, April 04, 2016 1:05 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) curves. Yes. C:\Motor>graphRdat T HB1M_Core25_No_Field_No_Epoxy_800Am.rdat s = splin( h', b', 'monotone' ); !--error 999 splin: Wrong value for input argument #1: Not (strictly) increasing or +-inf detected. at line 22 of exec file called by : Since there are no inf values in the data; that kind of implies that it requires monotonic input in order to produce monotonic output; which ain't so useful. That said, I get that same error message whichever variation of the splin() function I try.... Which suggests there's something wrong with my data, but that stupid cos the data is real. The math has to adapt to the data not the other way around. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Mon Apr 4 16:43:14 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Mon, 4 Apr 2016 16:43:14 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: <57027D82.8010508@inria.fr> If your data are regulary sampled along the y axis you can use the sgolay filter (http://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter">http://en.wikipedia.org/wiki/Savitzky-Golay_filter)otherwise the loess regression (http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-nonparametric-regression.pdf) may be tried . Both methods and others like medianfilter , sdfilter, ... are available in the CWA scilab module... Serge Steer From scilab.20.browseruk at xoxy.net Mon Apr 4 16:45:22 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 4 Apr 2016 06:45:22 -0800 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: Rafael/Stepahane/Tom, The problem with using a median filter -- and actually any continuous filter -- is that it implies that the median value of any n-group of adjacent values is "more reliable" than the actual value *for every value in the dataset*. And I'm really not convinced that is true for this data. In other words. Continuous filtering can adjust all the values in the dataset; rather than just adjusting or rejecting the anomalous ones. One (large) erroneous data point early in the dataset would impose an influence upon the rest of the entire dataset causing a subtle shift in one direction or the other. If there are multiple erroneous values that all tend to be in the same direction -- as appears to be the case with these data -- then that shift accumulates through the dataset. And as an engineer, that feels wrong. If you're taking a set of measurements and some external influence messes with one of them -- a fly blocks your sensor -- you reject that single data point; not spread some percentage of it through the rest of your readings. I'm going to put in a request to the manufacturer of the equipment that produces this data, to request an explanation of the cause of the discontinuities; in the hope that might shed some light on the best way to deal with them. (With luck they'll have some standard mechanism for doing so.) (I've been trying to word the request all weekend, but its difficult to phrase it correctly. These are the pre-eminent people in their field; they don't know me, and I don't have an introduction; and their equipment defines the standard for these types of measurements. It is extremely difficult to formulate the request such that it does not imply some shortcoming in their equipment or techniques.) The data is magnetic field intensity vs field strength for samples of amorphous metal. The measurement involves ramping the surrounding field with one set of coils, and measuring the field strength induced in the material with another set of coils. The samples have hysteresis; the coils have hysteresis; the ambient surrounding can influence. The equipment goes to great pains to adjust the speed of ramping and sampling to try and eliminate discontinuities due to hysteresis and eddy current effects. I believe (at this point) that the discontinuities are due to these effects "settling out"; and the right thing to do is to essentially ignore them. My problem is how to go about that. I've come up with something. (It almost certainly can be written in a less prosaic way; but I'm still finding my feet in SciLab): plot2d( ptype, h*1000, b, style = [ rgb( i ) ] ); e = gce(); e.children.mark_style = 2; h1 = [h(1)]; b1 = [b(1)]; for n=2:size(h,'r') if( (b(n) - b(n-1)) / (h(n) - h(n-1) + %eps) > 0 ) then h1 = [ h1, h(n) ]; b1 = [ b1, b(n) ]; end end plot2d( ptype, h1*1000, b1, style = [ rgb( i + 1 ) ] ); h = h1'; b = b1'; h1 = [h(1)]; b1 = [b(1)]; for n=2:size(h,'r') if( (b(n) - b(n-1)) / (h(n) - h(n-1) + %eps) > 0 ) then h1 = [ h1, h(n) ]; b1 = [ b1, b(n) ]; end end plot2d( ptype, h1*1000, b1, style = [ rgb( i + 2 ) ] ); See the attached png. The black Xs are the raw data. The red is the results of the first pass. The green is the results of the second pass. The purple are hand-drawn "what I think I'd like" lines. What I like about this is that it only adjust (currently omits; but it could interpolate replacements) points that fall outside the criteria. As you said of the median filter; it doesn't guarantee monotonicity after one pass (or even 2), but it only makes changes where they are strictly required, leaving most of the raw data intact. (Note: At this stage I'm not saying that is the right thing to do; just that it seems to be :) I'm not entirely happy with the results: a) I think the had-drawn purple lines are a better representation of the replaced data; but I can't divine the criteria to produce those? b) I've hard coded two passes for this particular dataset; but I need to repeat until no negative slopes remain; and I haven't worked out how to do that yet. Comments; rebuttals; referrals to the abuse of SciLab/math police; along with better implementations of what I have; or better criteria for solving my problem all actively sought. Thanks, Buk. > -----Original Message----- > From: scilab.browseruk.b28bd2e902.jrafaelbguerra#hotmail.com at ob.0sg.net > Sent: Mon, 4 Apr 2016 14:58:47 +0200 > To: users at lists.scilab.org > Subject: Re: [Scilab-users] "Smoothing" very localised discontinuities in > (scilab: to exclusive) (scilab: to exclusive) curves. > > If your data is not recorded in real-time, you can sort it (along the > x-axis) > and this does not imply that the "y(x) function" will become monotonous. > See > below. > > As suggested, by Stephane Mottelet, see one 3-point median filter > solution below > applied to data similar to yours: > > > M = [1.0 -0.2; > 1.4 0.0; > 2.1 0.2; > 1.7 0.45; > 2.45 0.5; > 2.95 0.6; > 2.5 0.75; > 3.0 0.8; > 3.3 1.2]; > x0 = M(:,1); > y0 = M(:,2); > clf(); > plot2d(x0,[y0 y0],style=[5 -9]); > [x,ix] = gsort(x0,'g','i'); // sorting input x-axis > y = y0(ix); > k =1; // median filter half-lenght > n = length(x); > x(2:n+1)=x; y(2:n+1)=y; > x(1)=x(2); y(1)=y(2); > x(n+2)=x(n+1); y(n+2)=y(n+1); > n = length(x); > for j = 1:n > j1 = max(1,j-k); > j2 = min(n,j+k); > ym(j) = median(y(j1:j2)); > end > plot2d(x,ym+5e-3,style=[3],leg="3-point median filtering@"); // shift for > display purposes > > > > This gets rid of obvious outliers but does not guarantee a monotonous > output > (idem for the more robust LOWESS technique, that can be googled). > > Rafael > ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/password-manager -------------- next part -------------- A non-text attachment was scrubbed... Name: disconsRemoved.png Type: image/png Size: 60006 bytes Desc: not available URL: From stephane.mottelet at utc.fr Mon Apr 4 16:59:58 2016 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 4 Apr 2016 16:59:58 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: <5702816E.7010002@utc.fr> Hello, The last time I had used a median filter, it was to locate peaks in a frequency DSP. The idea was to substract the median-filtered spectrum to the original one, and treshold the difference. This was enough to locate the peaks. Maybe you could use the same idea there. S. Le 04/04/2016 16:45, scilab.20.browseruk at xoxy.net a ?crit : > Rafael/Stepahane/Tom, > > The problem with using a median filter -- and actually any continuous filter -- is that it implies that the median value of any n-group of adjacent values is "more reliable" than the actual value *for every value in the dataset*. And I'm really not convinced that is true for this data. > > In other words. Continuous filtering can adjust all the values in the dataset; rather than just adjusting or rejecting the anomalous ones. One (large) erroneous data point early in the dataset would impose an influence upon the rest of the entire dataset causing a subtle shift in one direction or the other. If there are multiple erroneous values that all tend to be in the same direction -- as appears to be the case with these data -- then that shift accumulates through the dataset. > > And as an engineer, that feels wrong. If you're taking a set of measurements and some external influence messes with one of them -- a fly blocks your sensor -- you reject that single data point; not spread some percentage of it through the rest of your readings. > > I'm going to put in a request to the manufacturer of the equipment that produces this data, to request an explanation of the cause of the discontinuities; in the hope that might shed some light on the best way to deal with them. (With luck they'll have some standard mechanism for doing so.) > > (I've been trying to word the request all weekend, but its difficult to phrase it correctly. These are the pre-eminent people in their field; they don't know me, and I don't have an introduction; and their equipment defines the standard for these types of measurements. It is extremely difficult to formulate the request such that it does not imply some shortcoming in their equipment or techniques.) > > The data is magnetic field intensity vs field strength for samples of amorphous metal. The measurement involves ramping the surrounding field with one set of coils, and measuring the field strength induced in the material with another set of coils. The samples have hysteresis; the coils have hysteresis; the ambient surrounding can influence. The equipment goes to great pains to adjust the speed of ramping and sampling to try and eliminate discontinuities due to hysteresis and eddy current effects. > > I believe (at this point) that the discontinuities are due to these effects "settling out"; and the right thing to do is to essentially ignore them. My problem is how to go about that. > > I've come up with something. (It almost certainly can be written in a less prosaic way; but I'm still finding my feet in SciLab): > > plot2d( ptype, h*1000, b, style = [ rgb( i ) ] ); > e = gce(); e.children.mark_style = 2; > > h1 = [h(1)]; b1 = [b(1)]; > for n=2:size(h,'r') > if( (b(n) - b(n-1)) / (h(n) - h(n-1) + %eps) > 0 ) then > h1 = [ h1, h(n) ]; b1 = [ b1, b(n) ]; > end > end > plot2d( ptype, h1*1000, b1, style = [ rgb( i + 1 ) ] ); > > h = h1'; b = b1'; > h1 = [h(1)]; b1 = [b(1)]; > for n=2:size(h,'r') > if( (b(n) - b(n-1)) / (h(n) - h(n-1) + %eps) > 0 ) then > h1 = [ h1, h(n) ]; b1 = [ b1, b(n) ]; > end > end > plot2d( ptype, h1*1000, b1, style = [ rgb( i + 2 ) ] ); > > See the attached png. The black Xs are the raw data. > The red is the results of the first pass. > The green is the results of the second pass. > The purple are hand-drawn "what I think I'd like" lines. > > What I like about this is that it only adjust (currently omits; but it could interpolate replacements) points that fall outside the criteria. As you said of the median filter; it doesn't guarantee monotonicity after one pass (or even 2), but it only makes changes where they are strictly required, leaving most of the raw data intact. > > (Note: At this stage I'm not saying that is the right thing to do; just that it seems to be :) > > I'm not entirely happy with the results: > > a) I think the had-drawn purple lines are a better representation of the replaced data; but I can't divine the criteria to produce those? > b) I've hard coded two passes for this particular dataset; but I need to repeat until no negative slopes remain; and I haven't worked out how to do that yet. > > Comments; rebuttals; referrals to the abuse of SciLab/math police; along with better implementations of what I have; or better criteria for solving my problem all actively sought. > > Thanks, Buk. > > > >> -----Original Message----- >> From: scilab.browseruk.b28bd2e902.jrafaelbguerra#hotmail.com at ob.0sg.net >> Sent: Mon, 4 Apr 2016 14:58:47 +0200 >> To: users at lists.scilab.org >> Subject: Re: [Scilab-users] "Smoothing" very localised discontinuities in >> (scilab: to exclusive) (scilab: to exclusive) curves. >> >> If your data is not recorded in real-time, you can sort it (along the >> x-axis) >> and this does not imply that the "y(x) function" will become monotonous. >> See >> below. >> >> As suggested, by Stephane Mottelet, see one 3-point median filter >> solution below >> applied to data similar to yours: >> >> >> M = [1.0 -0.2; >> 1.4 0.0; >> 2.1 0.2; >> 1.7 0.45; >> 2.45 0.5; >> 2.95 0.6; >> 2.5 0.75; >> 3.0 0.8; >> 3.3 1.2]; >> x0 = M(:,1); >> y0 = M(:,2); >> clf(); >> plot2d(x0,[y0 y0],style=[5 -9]); >> [x,ix] = gsort(x0,'g','i'); // sorting input x-axis >> y = y0(ix); >> k =1; // median filter half-lenght >> n = length(x); >> x(2:n+1)=x; y(2:n+1)=y; >> x(1)=x(2); y(1)=y(2); >> x(n+2)=x(n+1); y(n+2)=y(n+1); >> n = length(x); >> for j = 1:n >> j1 = max(1,j-k); >> j2 = min(n,j+k); >> ym(j) = median(y(j1:j2)); >> end >> plot2d(x,ym+5e-3,style=[3],leg="3-point median filtering@"); // shift for >> display purposes >> >> >> >> This gets rid of obvious outliers but does not guarantee a monotonous >> output >> (idem for the more robust LOWESS technique, that can be googled). >> >> Rafael >> > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/password-manager > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Apr 4 17:03:13 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 4 Apr 2016 17:03:13 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: Buk. Could you please provide the data points in your example so that we can test different methods. Note that in the moving median filter solution presented there is no propagation of errors because the original dataset is always used and only one filtering pass is made using a very short 3-point filter. Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of scilab.20.browseruk at xoxy.net Sent: Monday, April 04, 2016 4:45 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) curves. Rafael/Stepahane/Tom, The problem with using a median filter -- and actually any continuous filter -- is that it implies that the median value of any n-group of adjacent values is "more reliable" than the actual value *for every value in the dataset*. And I'm really not convinced that is true for this data. In other words. Continuous filtering can adjust all the values in the dataset; rather than just adjusting or rejecting the anomalous ones. One (large) erroneous data point early in the dataset would impose an influence upon the rest of the entire dataset causing a subtle shift in one direction or the other. If there are multiple erroneous values that all tend to be in the same direction -- as appears to be the case with these data -- then that shift accumulates through the dataset. And as an engineer, that feels wrong. If you're taking a set of measurements and some external influence messes with one of them -- a fly blocks your sensor -- you reject that single data point; not spread some percentage of it through the rest of your readings. I'm going to put in a request to the manufacturer of the equipment that produces this data, to request an explanation of the cause of the discontinuities; in the hope that might shed some light on the best way to deal with them. (With luck they'll have some standard mechanism for doing so.) (I've been trying to word the request all weekend, but its difficult to phrase it correctly. These are the pre-eminent people in their field; they don't know me, and I don't have an introduction; and their equipment defines the standard for these types of measurements. It is extremely difficult to formulate the request such that it does not imply some shortcoming in their equipment or techniques.) The data is magnetic field intensity vs field strength for samples of amorphous metal. The measurement involves ramping the surrounding field with one set of coils, and measuring the field strength induced in the material with another set of coils. The samples have hysteresis; the coils have hysteresis; the ambient surrounding can influence. The equipment goes to great pains to adjust the speed of ramping and sampling to try and eliminate discontinuities due to hysteresis and eddy current effects. I believe (at this point) that the discontinuities are due to these effects "settling out"; and the right thing to do is to essentially ignore them. My problem is how to go about that. I've come up with something. (It almost certainly can be written in a less prosaic way; but I'm still finding my feet in SciLab): plot2d( ptype, h*1000, b, style = [ rgb( i ) ] ); e = gce(); e.children.mark_style = 2; h1 = [h(1)]; b1 = [b(1)]; for n=2:size(h,'r') if( (b(n) - b(n-1)) / (h(n) - h(n-1) + %eps) > 0 ) then h1 = [ h1, h(n) ]; b1 = [ b1, b(n) ]; end end plot2d( ptype, h1*1000, b1, style = [ rgb( i + 1 ) ] ); h = h1'; b = b1'; h1 = [h(1)]; b1 = [b(1)]; for n=2:size(h,'r') if( (b(n) - b(n-1)) / (h(n) - h(n-1) + %eps) > 0 ) then h1 = [ h1, h(n) ]; b1 = [ b1, b(n) ]; end end plot2d( ptype, h1*1000, b1, style = [ rgb( i + 2 ) ] ); See the attached png. The black Xs are the raw data. The red is the results of the first pass. The green is the results of the second pass. The purple are hand-drawn "what I think I'd like" lines. What I like about this is that it only adjust (currently omits; but it could interpolate replacements) points that fall outside the criteria. As you said of the median filter; it doesn't guarantee monotonicity after one pass (or even 2), but it only makes changes where they are strictly required, leaving most of the raw data intact. (Note: At this stage I'm not saying that is the right thing to do; just that it seems to be :) I'm not entirely happy with the results: a) I think the had-drawn purple lines are a better representation of the replaced data; but I can't divine the criteria to produce those? b) I've hard coded two passes for this particular dataset; but I need to repeat until no negative slopes remain; and I haven't worked out how to do that yet. Comments; rebuttals; referrals to the abuse of SciLab/math police; along with better implementations of what I have; or better criteria for solving my problem all actively sought. Thanks, Buk. From scilab.20.browseruk at xoxy.net Mon Apr 4 17:53:08 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 4 Apr 2016 07:53:08 -0800 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: Rafael, > Could you please provide the data points in your example so that we can > test different methods. See attachment. To view an example of the discontinuities, zoom in on the interval between 0.4 and 0.5 T (Y-scale). I normally have to zoom twice to get a good spread. > > Note that in the moving median filter solution presented there is no > propagation of errors because the original dataset is always used and > only one filtering pass is made using a very short 3-point filter. Okay. I see that (now). However, looking at my data, I don't think that a single pass with a window of 3 will produce the results I need. That means either widening the window, or iterating the filter (AFAIK?). > > Regards, > Rafael > Thanks for looking at this. Buk. ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/password-manager -------------- next part -------------- A non-text attachment was scrubbed... Name: HB1M_Core25_No_Field_No_Epoxy_800Am.initial.rdat Type: application/octet-stream Size: 12147 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Mon Apr 4 18:22:34 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 4 Apr 2016 18:22:34 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: Buk., Tested the 3-point median filter solution on your data and results seem Ok to me: ZOOM around 0.4-0.5: Note that in my original example I had shifted (by 5e-3 one of my curves for display purposes only, but no shift was applied the in above displays) Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of scilab.20.browseruk at xoxy.net Sent: Monday, April 04, 2016 5:53 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. Rafael, > Could you please provide the data points in your example so that we can > test different methods. See attachment. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 12626 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 7559 bytes Desc: not available URL: From tim at wescottdesign.com Mon Apr 4 18:38:57 2016 From: tim at wescottdesign.com (tim at wescottdesign.com) Date: Mon, 04 Apr 2016 09:38:57 -0700 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: <0e74e2fa2e881508887467847e8138d2@wescottdesign.com> This is kind of in line with what I said about deciding what your noise characteristics are and taking them into account. In this case you feel that the "noise" mostly very small but occasionally huge. If that's the case then the correct thing to do is to toss that measurement out (with patching things up left as another step). I should be working so I may be telling you to do what you're already doing, but one approach to take would be to filter the data, probably with a filter of limited horizons (i.e. a linear FIR filter or a median filter), then compare the difference between the filtered and measured data point-by-point. Any place where the difference is larger than a threshold, call that point bad. In Scilab-ish pseudo-code: x = independent axis (your vertical axis, I think) y = dependent axis yf = filter(y) // insert correct filtering algorithm here // From here on it could be real Scilab code goodix = find(abs(y - yf) < threshold); // This assumes no interpolation to replace bad points x_good = x[goodix]; y_good = y[goodix]; You may need to use log(y) for this to work (i.e., use yf = filter(log(y))) -- I noticed that in the graph you posted the horizontal axis was in logarithms. If the error is always in one direction you may want to do your comparison without the "abs" operator -- use your judgment in this regard. On wording your letter -- I suggest just a straightforward description of what you're seeing, and a request for information on whether they've seen it before. It may well be that it's either something that happens in some corner cases and you're lucky, or that you only _think_ that you're following directions. Speaking as a guy who spends a lot of time designing circuits and writing embedded software, it's also always possible that they've made some nifty upgrade to something and in the process introduced a bug -- in that case, unless they're stupidly arrogant, they'd like to hear from a sympathetic, cooperative user to help them clear things up. On 2016-04-04 07:45, scilab.20.browseruk at xoxy.net wrote: > Rafael/Stepahane/Tom, > > The problem with using a median filter -- and actually any continuous > filter -- is that it implies that the median value of any n-group of > adjacent values is "more reliable" than the actual value *for every > value in the dataset*. And I'm really not convinced that is true for > this data. > > In other words. Continuous filtering can adjust all the values in the > dataset; rather than just adjusting or rejecting the anomalous ones. > One (large) erroneous data point early in the dataset would impose an > influence upon the rest of the entire dataset causing a subtle shift > in one direction or the other. If there are multiple erroneous values > that all tend to be in the same direction -- as appears to be the case > with these data -- then that shift accumulates through the dataset. > > And as an engineer, that feels wrong. If you're taking a set of > measurements and some external influence messes with one of them -- a > fly blocks your sensor -- you reject that single data point; not > spread some percentage of it through the rest of your readings. > > I'm going to put in a request to the manufacturer of the equipment > that produces this data, to request an explanation of the cause of the > discontinuities; in the hope that might shed some light on the best > way to deal with them. (With luck they'll have some standard mechanism > for doing so.) > > (I've been trying to word the request all weekend, but its difficult > to phrase it correctly. These are the pre-eminent people in their > field; they don't know me, and I don't have an introduction; and their > equipment defines the standard for these types of measurements. It is > extremely difficult to formulate the request such that it does not > imply some shortcoming in their equipment or techniques.) > > The data is magnetic field intensity vs field strength for samples of > amorphous metal. The measurement involves ramping the surrounding > field with one set of coils, and measuring the field strength induced > in the material with another set of coils. The samples have > hysteresis; the coils have hysteresis; the ambient surrounding can > influence. The equipment goes to great pains to adjust the speed of > ramping and sampling to try and eliminate discontinuities due to > hysteresis and eddy current effects. > > I believe (at this point) that the discontinuities are due to these > effects "settling out"; and the right thing to do is to essentially > ignore them. My problem is how to go about that. > > I've come up with something. (It almost certainly can be written in a > less prosaic way; but I'm still finding my feet in SciLab): > > plot2d( ptype, h*1000, b, style = [ rgb( i ) ] ); > e = gce(); e.children.mark_style = 2; > > h1 = [h(1)]; b1 = [b(1)]; > for n=2:size(h,'r') > if( (b(n) - b(n-1)) / (h(n) - h(n-1) + %eps) > 0 ) then > h1 = [ h1, h(n) ]; b1 = [ b1, b(n) ]; > end > end > plot2d( ptype, h1*1000, b1, style = [ rgb( i + 1 ) ] ); > > h = h1'; b = b1'; > h1 = [h(1)]; b1 = [b(1)]; > for n=2:size(h,'r') > if( (b(n) - b(n-1)) / (h(n) - h(n-1) + %eps) > 0 ) then > h1 = [ h1, h(n) ]; b1 = [ b1, b(n) ]; > end > end > plot2d( ptype, h1*1000, b1, style = [ rgb( i + 2 ) ] ); > > See the attached png. The black Xs are the raw data. > The red is the results of the first pass. > The green is the results of the second pass. > The purple are hand-drawn "what I think I'd like" lines. > > What I like about this is that it only adjust (currently omits; but it > could interpolate replacements) points that fall outside the criteria. > As you said of the median filter; it doesn't guarantee monotonicity > after one pass (or even 2), but it only makes changes where they are > strictly required, leaving most of the raw data intact. > > (Note: At this stage I'm not saying that is the right thing to do; > just that it seems to be :) > > I'm not entirely happy with the results: > > a) I think the had-drawn purple lines are a better representation of > the replaced data; but I can't divine the criteria to produce those? > b) I've hard coded two passes for this particular dataset; but I need > to repeat until no negative slopes remain; and I haven't worked out > how to do that yet. > > Comments; rebuttals; referrals to the abuse of SciLab/math police; > along with better implementations of what I have; or better criteria > for solving my problem all actively sought. > > Thanks, Buk. > > > >> -----Original Message----- >> From: >> scilab.browseruk.b28bd2e902.jrafaelbguerra#hotmail.com at ob.0sg.net >> Sent: Mon, 4 Apr 2016 14:58:47 +0200 >> To: users at lists.scilab.org >> Subject: Re: [Scilab-users] "Smoothing" very localised discontinuities >> in >> (scilab: to exclusive) (scilab: to exclusive) curves. >> >> If your data is not recorded in real-time, you can sort it (along the >> x-axis) >> and this does not imply that the "y(x) function" will become >> monotonous. >> See >> below. >> >> As suggested, by Stephane Mottelet, see one 3-point median filter >> solution below >> applied to data similar to yours: >> >> >> M = [1.0 -0.2; >> 1.4 0.0; >> 2.1 0.2; >> 1.7 0.45; >> 2.45 0.5; >> 2.95 0.6; >> 2.5 0.75; >> 3.0 0.8; >> 3.3 1.2]; >> x0 = M(:,1); >> y0 = M(:,2); >> clf(); >> plot2d(x0,[y0 y0],style=[5 -9]); >> [x,ix] = gsort(x0,'g','i'); // sorting input x-axis >> y = y0(ix); >> k =1; // median filter half-lenght >> n = length(x); >> x(2:n+1)=x; y(2:n+1)=y; >> x(1)=x(2); y(1)=y(2); >> x(n+2)=x(n+1); y(n+2)=y(n+1); >> n = length(x); >> for j = 1:n >> j1 = max(1,j-k); >> j2 = min(n,j+k); >> ym(j) = median(y(j1:j2)); >> end >> plot2d(x,ym+5e-3,style=[3],leg="3-point median filtering@"); // shift >> for >> display purposes >> >> >> >> This gets rid of obvious outliers but does not guarantee a monotonous >> output >> (idem for the more robust LOWESS technique, that can be googled). >> >> Rafael >> > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/password-manager > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From scilab.20.browseruk at xoxy.net Mon Apr 4 18:43:56 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 4 Apr 2016 08:43:56 -0800 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) curves. In-Reply-To: <1bfd3f0ddffa0b82e28b9602484a217c@wescottdesign.com> References: Message-ID: Tim, (sorry for the earlier "Tom"; finger trouble not name recognition problems :) > If your FEM software can't handle non-monotonic data, can it handle > noisy data? That's a good (and open) question. The software is FEMM (www.femm.info) which is widely held in high esteem. When entering BH curve values into the materials definitions for those with non-linear magnetic properties, the program simply won't allow you to enter non-monotonic data; hence my need to remove these discontinuities before I can progress my project. Once given data it will accept, it then manipulates the data to allow it to ... "do its thang". It's easier (and far more accurate) for me to quote David Meaker here than try to paraphrase him: "Since FEMM interpolates between your B-H points using cubic splines, it is possible to get a bad curve if you haven?t entered an adequate number of points. ?Weird? B-H curves can result if you have entered too few points around relatively sudden changes in the B-H curve. Femm ?takes care of? bad B-H data (i.e. B-H data that would result in a cubic spline ?t that is not single-valued) by repeatedly smoothing the B-H data using a three-point moving average ?lter until a ?t is obtained that is single-valued. This approach is robust in the sense that it always yields a single-valued curve, but the result might be a poor match to the original B-H data. It may also be important to note that FEMM extrapolates linearly off the end of your B-H curve if the program encounters ?ux density/?eld intensity levels that are out of the range of the values that you have entered. This extrapolation may make the material look more permeable than it ?really? is at high ?ux densities. You have to be careful to enter enough B-H values to get an accurate solution in highly saturated structures so that the program is interpolating between your entered data points, rather than extrapolating. Also in the nonlinear parameters box is a parameter, ?hmax. For nonlinear problems, the hys-teresis lag is assumed to be proportional to the effective permeability. At the highest effective permeability, the hysteresis angle is assumed to reach its maximal value of ?hmax. This idea can be represented by the formula: ?h(B) = ( ?e f f (B) ) / ( ?e f f ,max ) ?hmax " So the first goal is to get data that FEMM will accept. After that there are other criteria that may require the raw data to be further manipulated. I've demonstrated that 'inconveniently real-world' data can interact badly in (at least) two different ways. with FEMMs manipulation and use of that data in its Tensor equations: 1) Unless the final points approach a slope of 0 very closely, it can extrapolate the data to produce ludicrously high B values. (Eg. the 'best# I achieved was 67.7T!) 2) Unless the data values works with FEMM's interpolations rather than against them; it can result in extraordinarily long processing times as the Newton-Ralphson iterations oscillate and converge very slowly. The former is fairly easy to deal with by simply appending a few artificial values to the dataset that ensure a very near 0 slope. The latter is far harder to get a handle on. One of the reasons I'm being quite adamant about making a little change to the real data as possible is so as to give me a chance to determine the absolute minimum requirements for ensuring accurate simulations with minimal run times. The typical approach to the latter problem seems to be to approximate the data using some nicely behaving mathematical approximations (1-exp( tanh ) or similar), and feed those values as the materials definition. The problem with that is that it throws away much of the subtlety of the data; which for silicon steel laminates doesn't matter; but for amorphous/nono-crystalline metals, can mask important parts of their desirable behaviours. Indeed, my entire foray into learning SciLab is to try and establish a good method for pre-processing these kind of curves so that it strikes the balance between horrendous run times; and using artificial substitutes that ignore those subtleties. And yes. You've certainly given me food for thought :) > > I'm taking "smoothing" to mean "filtering" here. > > In general the filtering problem is to decide on the characteristics of > your desired signal, the characteristics of your noise, and then make > some mathematical transformation that minimizes the effects of anything > with noise-like characteristics while retaining as much of anything with > desired-signal-like characteristics. > > This has two salient corollaries: first, you have to know what the > characteristics of your signal and noise are; and second, the more that > your signal resembles your noise, the less of it you will be able to > recover. > > You can spin off from there in a number of different directions, leading > you to a number of different filtering techniques. > > It appears that you're doing your measurements by varying some > controlled parameter along the vertical axis and measuring along the > horizontal axis. If this is the case, then I would start by trying > filtering techniques using the vertical axis as your "time" axis. > > There is no linear filtering technique (i.e., output sample = weighted > some of a vector of input samples) that you can use that guarantees > monotonicity for all possible inputs. If you use linear filtering then > you need to verify monotonicity by experiment. If your FEC program is > messed up by noise as much as non-monotonicity, then this is not a bad > thing -- it's just an indication that you're filtering heavily enough. > > If the problem really, truly is monotonicity, then take the derivative > at each point, and snip out the points that go the wrong direction. I > suspect this won't lead to joy, but it'll meet your stated objectives. > > If the problem with the smoothing filters that you've tried is that it > works well in some spots and not in others, then consider using a filter > whose properties vary depending on where on the axis your output sample > is located. This isn't something that you'll find pre-packaged -- > you'll have to whomp something up using more primitive functions of > Scilab. > > I could go on and on -- sorry for coming to a disorganized end here, but > I hope I'm giving you some food for thought. > ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! From tim at wescottdesign.com Mon Apr 4 19:07:45 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Mon, 04 Apr 2016 10:07:45 -0700 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: <1459789665.2711.47.camel@Servo> I wish you'd made this response to the list. Here's another thought, to address your overall problem: * Find out what flavor of splines FEMM uses (there are subtleties). * Figure out what Scilab calls them (naturally, everyone uses different names -- particularly when there's multiple countries and/or disciplines involved) * Get your bad data point problem beaten to the ground * Use Scilab to find the minimum number of points and their locations which, when smoothed with the right kind of splines, gives an acceptably close match to your B-H curve. Determining what's "acceptably close" is your job, of course. You may find that minimizing the number of points helps the speed, you may not -- it may just be that FEMM's numerical solver doesn't like a large second derivative in the B-H data, in which case you'll just need to smile and accept long solver times. On Mon, 2016-04-04 at 08:43 -0800, scilab.20.browseruk at xoxy.net wrote: > Tim, > > (sorry for the earlier "Tom"; finger trouble not name recognition problems :) > > > If your FEM software can't handle non-monotonic data, can it handle > > noisy data? > > That's a good (and open) question. > > The software is FEMM (www.femm.info) which is widely held in high esteem. > > When entering BH curve values into the materials definitions for those with non-linear magnetic properties, the program simply won't allow you to enter non-monotonic data; hence my need to remove these discontinuities before I can progress my project. > > Once given data it will accept, it then manipulates the data to allow it to ... "do its thang". It's easier (and far more accurate) for me to quote David Meaker here than try to paraphrase him: > > "Since FEMM interpolates between your B-H points using cubic splines, it is possible to get a bad curve if you haven?t entered an adequate number of points. ?Weird? B-H curves can result if you have entered too few points around relatively sudden changes in the B-H curve. Femm ?takes care of? bad B-H data (i.e. B-H data that would result in a cubic spline ?t that is not single-valued) by repeatedly smoothing the B-H data using a three-point moving average ?lter until a ?t is obtained that is single-valued. This approach is robust in the sense that it always yields a single-valued curve, but the result might be a poor match to the original B-H data. It may also be important to note that FEMM extrapolates linearly off the end of your B-H curve if the program encounters ?ux density/?eld intensity levels that are out of the range of the values that you have entered. This extrapolation may make the material look more permeable than it ?really? is at high ?ux densities. You have to be careful to enter enough B-H values to get an accurate solution in highly saturated structures so that the program is interpolating between your entered data points, rather than extrapolating. Also in the nonlinear parameters box is a parameter, ?hmax. For nonlinear problems, the hys-teresis lag is assumed to be proportional to the effective permeability. At the highest effective permeability, the hysteresis angle is assumed to reach its maximal value of ?hmax. This idea can be represented by the formula: ?h(B) = ( ?e f f (B) ) / ( ?e f f ,max ) ?hmax " > > So the first goal is to get data that FEMM will accept. After that there are other criteria that may require the raw data to be further manipulated. > > I've demonstrated that 'inconveniently real-world' data can interact badly in (at least) two different ways. with FEMMs manipulation and use of that data in its Tensor equations: > > 1) Unless the final points approach a slope of 0 very closely, it can extrapolate the data to produce ludicrously high B values. (Eg. the 'best# I achieved was 67.7T!) > > 2) Unless the data values works with FEMM's interpolations rather than against them; it can result in extraordinarily long processing times as the Newton-Ralphson iterations oscillate and converge very slowly. > > The former is fairly easy to deal with by simply appending a few artificial values to the dataset that ensure a very near 0 slope. > > The latter is far harder to get a handle on. One of the reasons I'm being quite adamant about making a little change to the real data as possible is so as to give me a chance to determine the absolute minimum requirements for ensuring accurate simulations with minimal run times. > > The typical approach to the latter problem seems to be to approximate the data using some nicely behaving mathematical approximations (1-exp( tanh ) or similar), and feed those values as the materials definition. > > The problem with that is that it throws away much of the subtlety of the data; which for silicon steel laminates doesn't matter; but for amorphous/nono-crystalline metals, can mask important parts of their desirable behaviours. > > Indeed, my entire foray into learning SciLab is to try and establish a good method for pre-processing these kind of curves so that it strikes the balance between horrendous run times; and using artificial substitutes that ignore those subtleties. > > And yes. You've certainly given me food for thought :) > > > > > > > I'm taking "smoothing" to mean "filtering" here. > > > > In general the filtering problem is to decide on the characteristics of > > your desired signal, the characteristics of your noise, and then make > > some mathematical transformation that minimizes the effects of anything > > with noise-like characteristics while retaining as much of anything with > > desired-signal-like characteristics. > > > > This has two salient corollaries: first, you have to know what the > > characteristics of your signal and noise are; and second, the more that > > your signal resembles your noise, the less of it you will be able to > > recover. > > > > You can spin off from there in a number of different directions, leading > > you to a number of different filtering techniques. > > > > It appears that you're doing your measurements by varying some > > controlled parameter along the vertical axis and measuring along the > > horizontal axis. If this is the case, then I would start by trying > > filtering techniques using the vertical axis as your "time" axis. > > > > There is no linear filtering technique (i.e., output sample = weighted > > some of a vector of input samples) that you can use that guarantees > > monotonicity for all possible inputs. If you use linear filtering then > > you need to verify monotonicity by experiment. If your FEC program is > > messed up by noise as much as non-monotonicity, then this is not a bad > > thing -- it's just an indication that you're filtering heavily enough. > > > > If the problem really, truly is monotonicity, then take the derivative > > at each point, and snip out the points that go the wrong direction. I > > suspect this won't lead to joy, but it'll meet your stated objectives. > > > > If the problem with the smoothing filters that you've tried is that it > > works well in some spots and not in others, then consider using a filter > > whose properties vary depending on where on the axis your output sample > > is located. This isn't something that you'll find pre-packaged -- > > you'll have to whomp something up using more primitive functions of > > Scilab. > > > > I could go on and on -- sorry for coming to a disorganized end here, but > > I hope I'm giving you some food for thought. > > > > ____________________________________________________________ > FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! > Visit http://www.inbox.com/photosharing to find out more! > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From scilab.20.browseruk at xoxy.net Mon Apr 4 20:06:45 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 4 Apr 2016 10:06:45 -0800 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: <1459789665.2711.47.camel@Servo> References: Message-ID: Tim, > I wish you'd made this response to the list. Um... I thought I had. Or at least, it has come back to me via the list so I assume I must have? Or am I misunderstanding you? Buk. ____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop! Check it out at http://www.inbox.com/marineaquarium From scilab.20.browseruk at xoxy.net Mon Apr 4 20:38:02 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 4 Apr 2016 10:38:02 -0800 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: <57027D82.8010508@inria.fr> References: Message-ID: Serge, > > If your data are regulary sampled along the y axis you can use the The X-axis is the controlled variable, the Y-axis the dependent. However, (from my understanding which is sketchy), the software controlling the input has a feedback loop and attempts to adjust the rate and spacing of the input to provide good data around the fine detail of the slope; so the input isn't necessarily exactly linear, though if you inspect the output closely, it seems to have a linear step size. Indeed. I suspect that the discontinuities I'm seeing are a result of the control software back-stepping around certain positions to correct for detected 'external influences' (such as eddy current build-up or induction lag). It is this hypothesis that I am going to try to get conformed by the equipment manufacturer. > sgolay filter > (http://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter">http://en.wikipedia.org/wiki/Savitzky-Golay_filter)otherwise > the loess regression > (http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-nonparametric-regression.pdf) That pdf does not seem to be available to me? (The requested URL was not found on this server) > may be tried . > > Both methods and others like medianfilter , sdfilter, ... are available > in the CWA scilab module... 'scuse my ignorance of these things; but it the "CWA scilab module" available as an ATOM? (If so, in which category?) Or should I be looking somewhere else? > > Serge Steer Cheers, Buk. ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/password-manager From scilab.20.browseruk at xoxy.net Mon Apr 4 20:42:56 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 4 Apr 2016 10:42:56 -0800 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: Rafael, > Buk., > > Tested the 3-point median filter solution on your data and results seem > Ok to> me: > > > ZOOM around 0.4-0.5: > > > Note that in my original example I had shifted (by 5e-3 one of my curves > for display purposes only, but no shift was applied the in above displays) This reads as though you've attached some "displays" to your post, but nothng made it to me? > > Regards, > Rafael I will try and replicate it here; but my unfamiliarity with SciLab means it sometimes takes me a while to get these things to work :( Thanks, Buk ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/password-manager From cfuttrup at gmail.com Mon Apr 4 20:48:27 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 4 Apr 2016 20:48:27 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: <5702B6FB.6060603@gmail.com> Hi Buk Thanks for sharing information about what you're doing. Quite interesting ... I sometimes work with magnetic simulations (but not FEMM). Regarding "CWA Scilab", I ran a simple Google search for you: https://atoms.scilab.org/toolboxes/CWA Best regards, Claus On 04-04-2016 20:38, scilab.20.browseruk at xoxy.net wrote: > Serge, > >> If your data are regulary sampled along the y axis you can use the > The X-axis is the controlled variable, the Y-axis the dependent. > > However, (from my understanding which is sketchy), the software controlling the input has a feedback loop and attempts to adjust the rate and spacing of the input to provide good data around the fine detail of the slope; so the input isn't necessarily exactly linear, though if you inspect the output closely, it seems to have a linear step size. > > Indeed. I suspect that the discontinuities I'm seeing are a result of the control software back-stepping around certain positions to correct for detected 'external influences' (such as eddy current build-up or induction lag). It is this hypothesis that I am going to try to get conformed by the equipment manufacturer. > >> sgolay filter >> (http://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter">http://en.wikipedia.org/wiki/Savitzky-Golay_filter)otherwise >> the loess regression >> (http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-nonparametric-regression.pdf) > That pdf does not seem to be available to me? (The requested URL was not found on this server) > >> may be tried . >> >> Both methods and others like medianfilter , sdfilter, ... are available >> in the CWA scilab module... > 'scuse my ignorance of these things; but it the "CWA scilab module" available as an ATOM? (If so, in which category?) > > Or should I be looking somewhere else? > >> Serge Steer > Cheers, Buk. > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/password-manager > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From tim at wescottdesign.com Mon Apr 4 21:06:10 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Mon, 04 Apr 2016 12:06:10 -0700 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: <1459796770.2711.66.camel@Servo> In the graph that you posted some time back (sorry, I haven't been saving emails), it appears that the x-axis numbers are not increasing monotonically. This is what led me (and, apparently, others) to assume that the y-axis is the controlled variable. If the machine is, indeed, stepping backwards when it's unhappy, couldn't you just snip out the earlier instance of the same x-axis value, and reorder as necessary? Would this make for happy data? I agree that asking the machine manufacturer what's what is best at this point. It does seem odd that they're not snipping out the data they determine is bad -- if you're really lucky they're doing an outstanding job, and you just need to figure out how to ask the machine to suppress the bad data before you get it. On Mon, 2016-04-04 at 10:38 -0800, scilab.20.browseruk at xoxy.net wrote: > Serge, > > > > > If your data are regulary sampled along the y axis you can use the > > The X-axis is the controlled variable, the Y-axis the dependent. > > However, (from my understanding which is sketchy), the software controlling the input has a feedback loop and attempts to adjust the rate and spacing of the input to provide good data around the fine detail of the slope; so the input isn't necessarily exactly linear, though if you inspect the output closely, it seems to have a linear step size. > > Indeed. I suspect that the discontinuities I'm seeing are a result of the control software back-stepping around certain positions to correct for detected 'external influences' (such as eddy current build-up or induction lag). It is this hypothesis that I am going to try to get conformed by the equipment manufacturer. > > > sgolay filter > > (http://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter">http://en.wikipedia.org/wiki/Savitzky-Golay_filter)otherwise > > the loess regression > > (http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-nonparametric-regression.pdf) > > That pdf does not seem to be available to me? (The requested URL was not found on this server) > > > may be tried . > > > > Both methods and others like medianfilter , sdfilter, ... are available > > in the CWA scilab module... > > 'scuse my ignorance of these things; but it the "CWA scilab module" available as an ATOM? (If so, in which category?) > > Or should I be looking somewhere else? > > > > > Serge Steer > > Cheers, Buk. > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/password-manager > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From Serge.Steer at inria.fr Mon Apr 4 21:23:28 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Mon, 4 Apr 2016 21:23:28 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: <5702BF30.80207@inria.fr> Le 04/04/2016 20:38, scilab.20.browseruk at xoxy.net a ?crit : > Serge, > > >> sgolay filter >> (http://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter">http://en.wikipedia.org/wiki/Savitzky-Golay_filter)otherwise >> the loess regression >> (http://cran.r-project.org/doc/contrib/Fox-Companion/appendix-nonparametric-regression.pdf) > That pdf does not seem to be available to me? (The requested URL was not found on this server) You are right the URL is no more active You can find it here https://socserv.socsci.mcmaster.ca/jfox/Books/Companion/appendix/Appendix-Nonparametric-Regression.pdf >> may be tried . >> >> Both methods and others like medianfilter , sdfilter, ... are available >> in the CWA scilab module... > 'scuse my ignorance of these things; but it the "CWA scilab module" available as an ATOM? (If so, in which category?) Data Analysis and statistics https://atoms.scilab.org/toolboxes/CWA > Or should I be looking somewhere else? > > From scilab.20.browseruk at xoxy.net Mon Apr 4 21:23:45 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 4 Apr 2016 11:23:45 -0800 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: <5702B6FB.6060603@gmail.com> References: Message-ID: Claus, > > Regarding "CWA Scilab", I ran a simple Google search for you: > https://atoms.scilab.org/toolboxes/CWA Touch?! :) Problem: I don't know how to load a library into SciLab other than through the 'Module manager - ATOMS' menu item in the console; and whilst I found a package called Cardiovascular Toolbox in there; that appears to be (going by the information on the page you linked) and older, obsolete version of the Cardiovascular Wave Analysis package? Could I prevail upon you to guide me in how to install from the lined page; or how to direct the ATOM manager to 'see' the CWA package? Thanks, Buk. ____________________________________________________________ FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop! Check it out at http://www.inbox.com/marineaquarium From cfuttrup at gmail.com Mon Apr 4 21:41:54 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 4 Apr 2016 21:41:54 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: <5702C382.5000801@gmail.com> Hi Buk The webpage for CWA says (copy/paste): Category Data Analysis And Statistics I just checked in my own Scilab - push "cardboard box" icon ... ATOMS updates. Then go into "Data Analysis and Statistics" ... Yup, it's there - at least here on my Scilab. It is named "Cardiovascular Toolbox" ... Best regards, Claus On 04-04-2016 21:23, scilab.20.browseruk at xoxy.net wrote: > Claus, > >> Regarding "CWA Scilab", I ran a simple Google search for you: >> https://atoms.scilab.org/toolboxes/CWA > Touch?! :) > > Problem: I don't know how to load a library into SciLab other than through the 'Module manager - ATOMS' menu item in the console; and whilst I found a package called Cardiovascular Toolbox in there; that appears to be (going by the information on the page you linked) and older, obsolete version of the Cardiovascular Wave Analysis package? > > Could I prevail upon you to guide me in how to install from the lined page; or how to direct the ATOM manager to 'see' the CWA package? > > Thanks, Buk. > > ____________________________________________________________ > FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop! > Check it out at http://www.inbox.com/marineaquarium > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Apr 4 22:23:43 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 4 Apr 2016 22:23:43 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: Burk. I am sending results as Plain Text with attachments. PS: the former pictures were embedded in a HTML-email which I could read fine. Rgds Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of scilab.20.browseruk at xoxy.net Sent: Monday, April 04, 2016 8:43 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. Rafael, > Buk., > > Tested the 3-point median filter solution on your data and results seem > Ok to> me: > > > ZOOM around 0.4-0.5: > > > Note that in my original example I had shifted (by 5e-3 one of my curves > for display purposes only, but no shift was applied the in above displays) This reads as though you've attached some "displays" to your post, but nothng made it to me? > > Regards, > Rafael I will try and replicate it here; but my unfamiliarity with SciLab means it sometimes takes me a while to get these things to work :( Thanks, Buk -------------- next part -------------- A non-text attachment was scrubbed... Name: Results_from_3point_median_filter.jpg Type: image/jpeg Size: 37434 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Results_from_3point_median_filter_ZOOM.jpg Type: image/jpeg Size: 34065 bytes Desc: not available URL: From perrichon.pierre at wanadoo.fr Mon Apr 4 22:29:26 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Mon, 4 Apr 2016 22:29:26 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: 1000 messages ! Before printing, think about ENVIRONMENTAL responsabity -----Message d'origine----- De?: users [mailto:users-bounces at lists.scilab.org] De la part de Rafael Guerra Envoy??: lundi 4 avril 2016 22:24 ??: 'Users mailing list for Scilab' Objet?: Re: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. Burk. I am sending results as Plain Text with attachments. PS: the former pictures were embedded in a HTML-email which I could read fine. Rgds Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of scilab.20.browseruk at xoxy.net Sent: Monday, April 04, 2016 8:43 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. Rafael, > Buk., > > Tested the 3-point median filter solution on your data and results > seem Ok to> me: > > > ZOOM around 0.4-0.5: > > > Note that in my original example I had shifted (by 5e-3 one of my > curves for display purposes only, but no shift was applied the in > above displays) This reads as though you've attached some "displays" to your post, but nothng made it to me? > > Regards, > Rafael I will try and replicate it here; but my unfamiliarity with SciLab means it sometimes takes me a while to get these things to work :( Thanks, Buk From scilab.20.browseruk at xoxy.net Mon Apr 4 23:18:43 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 4 Apr 2016 13:18:43 -0800 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: > Burk, > I am sending results as Plain Text with attachments. Thanks. > > PS: the former pictures were embedded in a HTML-email which I could read > fine. I should have thought of that; but I didn't. Sorry to have put you to extra work. > > Rgds > Rafael Buk (no r :) ____________________________________________________________ Send any screenshot to your friends in seconds... Works in all emails, instant messengers, blogs, forums and social networks. TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if2 for FREE From scilab.20.browseruk at xoxy.net Tue Apr 5 03:10:19 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 4 Apr 2016 17:10:19 -0800 Subject: [Scilab-users] Wrong number of arguments? Message-ID: What am I doing wrong? -->a=1:100; -->b = a.^(1/9); -->plot( a, b, 'ro-' ); -->c = loess( a, b, .05, 3 ); !--error 58 Wrong number of input arguments.at line 58 of function loess called by : c = loess( a, b, .05, 3 ); ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! From jrafaelbguerra at hotmail.com Tue Apr 5 13:18:08 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 5 Apr 2016 13:18:08 +0200 Subject: [Scilab-users] Wrong number of arguments? In-Reply-To: References: Message-ID: Fyi, that code does not produce errors in my Scilab 5.5.2 64-bit running on Win 7 -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of scilab.20.browseruk at xoxy.net Sent: Tuesday, April 05, 2016 3:10 AM To: users at lists.scilab.org Subject: [Scilab-users] Wrong number of arguments? What am I doing wrong? -->a=1:100; -->b = a.^(1/9); -->plot( a, b, 'ro-' ); -->c = loess( a, b, .05, 3 ); !--error 58 Wrong number of input arguments.at line 58 of function loess called by : c = loess( a, b, .05, 3 ); ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From jrafaelbguerra at hotmail.com Tue Apr 5 13:31:59 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 5 Apr 2016 13:31:59 +0200 Subject: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. In-Reply-To: References: Message-ID: Buk. Testing CWA toolbox's Loess code on your data seems to produce far superior results than the very simple 3-point median filter - see attached (sorry for the misspelling) Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of scilab.20.browseruk at xoxy.net Sent: Monday, April 04, 2016 11:19 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] "Smoothing" very localised discontinuities in (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) (scilab: to exclusive) curves. > Burk, > I am sending results as Plain Text with attachments. Thanks. > > PS: the former pictures were embedded in a HTML-email which I could read > fine. I should have thought of that; but I didn't. Sorry to have put you to extra work. > > Rgds > Rafael Buk (no r :) ____________________________________________________________ Send any screenshot to your friends in seconds... Works in all emails, instant messengers, blogs, forums and social networks. TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if2 for FREE _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- A non-text attachment was scrubbed... Name: Loess_vs_3point_median_filter_ZOOM.jpg Type: image/jpeg Size: 52177 bytes Desc: not available URL: From p.muehlmann at gmail.com Tue Apr 5 15:26:47 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Tue, 5 Apr 2016 15:26:47 +0200 Subject: [Scilab-users] check if variable within structure is available Message-ID: Is there a way to check if a variable within a structure is available? Example: There is a structure handle containing different variables. e.g: handles.status // contain Status info of different pushbuttons --> in fact status is a structure itself: handles.Status.pb1; handles.Status.pb2; handles.I_ORG // contains original Image --> array handles.I_RES // contains resulting Image --> array Now I want to check if handles.I_RES existst exists('handles.I_RES' , 'a') will return "0" even if handles.I_RES does exist isdef ('handles.I_RES' , 'a') will return "F" even if handles.I_RES does exist Thank you, Philipp -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From scilab.20.browseruk at xoxy.net Tue Apr 5 17:13:16 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Tue, 5 Apr 2016 07:13:16 -0800 Subject: [Scilab-users] Wrong number of arguments? exclusive) In-Reply-To: References: Message-ID: Rafael, > > Fyi, that code does not produce errors in my Scilab 5.5.2 64-bit running > on Win > 7 Long story short, after blowing away the entire SciLab installation and starting again from scratch, I've now got a working loess() function. (My guess is that while trying to work out how to install CWA yesterday, I also installed its obsolete predecessor and they conflicted.) > Testing CWA toolbox's Loess code on your data seems to produce far superior > results than the very simple 3-point median filter - see attached Looking at your demo (thanks for that) I was initially quite impressed. However, I wasn't so keen on the fact that with the 0.3 spread you were using, the function was affecting many more points than those I need to deal with. (My engineer's mandate that you stick as close to the real data as possible kicking in there :) So I started reducing the alpha parameter (#3) to see how close I could get to eliminating the inflections whilst leaving the rest as close to possible unaffected. I thought that I had found a good range of potential candidates (0.03 - 0.05, 2) when I happened to zoom on a particular region of the curve in the attachment. If you look closely -- and its not easy to see what is going on -- that particular set of wiggles in the raw data is causing the loess() function (with those particular sets of parameters) to produce loops. The cure is worse than the disease! Sure I can fix that by broadening the alpha parameter, but then I'm affecting pretty much every value in the dataset rather than just localised to where I need it. So now I'm back to tweaking your 3 point median filter (perhaps extending it to 5 or 7) and Claus' Barlett3p() to see which of them gets me closer to what I am after. And, from a couple of the seemingly random replies I received yesterday, it looks like I am taking up too much bandwidth here, so I'm going to back off and see how far what I've learnt will take me. Many thanks for the time and patience of all those who've been helping me. Buk. ____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! Check it out at http://www.inbox.com/earth -------------- next part -------------- A non-text attachment was scrubbed... Name: disconsLoops.png Type: image/png Size: 54956 bytes Desc: not available URL: From nicolas.fezans at gmail.com Tue Apr 5 19:14:18 2016 From: nicolas.fezans at gmail.com (Nicolas Fezans) Date: Tue, 5 Apr 2016 19:14:18 +0200 Subject: [Scilab-users] check if variable within structure is available In-Reply-To: References: Message-ID: Hi, just use: isfield(handles, 'I_RES') for that. You might want to check whether "handles" exists before making that test, if you want to be sure that your program won't abort execution with a non-treated error, if "handles" does not exist. Nicolas On Tue, Apr 5, 2016 at 3:26 PM, Philipp M?hlmann wrote: > Is there a way to check if a variable within a structure is available? > > > Example: > > There is a structure handle containing different variables. > > > e.g: > > handles.status // contain Status info of different pushbuttons --> in > fact status is a structure itself: handles.Status.pb1; handles.Status.pb2; > handles.I_ORG // contains original Image --> array > handles.I_RES // contains resulting Image --> array > > > Now I want to check if handles.I_RES existst > > > > exists('handles.I_RES' , 'a') will return "0" even if handles.I_RES does > exist > isdef ('handles.I_RES' , 'a') will return "F" even if handles.I_RES does > exist > > > Thank you, > Philipp > > -- > In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. > > There we have the salad. > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From cfuttrup at gmail.com Tue Apr 5 19:25:01 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Tue, 5 Apr 2016 19:25:01 +0200 Subject: [Scilab-users] Wrong number of arguments? exclusive) In-Reply-To: References: Message-ID: <5703F4ED.4070709@gmail.com> Hi Buk >your 3 point median filter (perhaps extending it to 5 or 7) and Claus' Barlett3p() Well, if the median filter doesn't solve the problem ... then for sure the Bartlett window will also not solve the problem - it was meant to be the least intrusive (most true to the original data) smoothing you could possibly do. I had major success with a Bartlett window, where I had a frequency response, did an inverse-discrete Fourier Transform (IDFT) ... and I used only 128 points (to reduce calculation time) so that time response had some zig-zag patterns - the Barlett window made a fantastic smooth result. Each smoothing window has its strengths and weaknesses. You can convert the code for Barlett3p to a Median3p, simply by replacing the weights (0.25 0.50 0.25) with equal weights ... i.e. 0.333 0.334 0.333 ... Someone suggested to compare the raw data with the smoothed data - and determine persistent issues. Maybe delete the tricky data that doesn't ensure convex space ... I think that's your best option because the remaining data is true to your original data. If deleting a data point is of concern - the alternative is to replace the bad data point with a data point interpolated between the surrounding data. /Claus On 05-04-2016 17:13, scilab.20.browseruk at xoxy.net wrote: > Rafael, > >> Fyi, that code does not produce errors in my Scilab 5.5.2 64-bit running >> on Win >> 7 > Long story short, after blowing away the entire SciLab installation and starting again from scratch, I've now got a working loess() function. > > (My guess is that while trying to work out how to install CWA yesterday, I also installed its obsolete predecessor and they conflicted.) > >> Testing CWA toolbox's Loess code on your data seems to produce far superior >> results than the very simple 3-point median filter - see attached > Looking at your demo (thanks for that) I was initially quite impressed. > > However, I wasn't so keen on the fact that with the 0.3 spread you were using, the function was affecting many more points than those I need to deal with. (My engineer's mandate that you stick as close to the real data as possible kicking in there :) > > So I started reducing the alpha parameter (#3) to see how close I could get to eliminating the inflections whilst leaving the rest as close to possible unaffected. > > I thought that I had found a good range of potential candidates (0.03 - 0.05, 2) when I happened to zoom on a particular region of the curve in the attachment. > > If you look closely -- and its not easy to see what is going on -- that particular set of wiggles in the raw data is causing the loess() function (with those particular sets of parameters) to produce loops. The cure is worse than the disease! > > Sure I can fix that by broadening the alpha parameter, but then I'm affecting pretty much every value in the dataset rather than just localised to where I need it. > > So now I'm back to tweaking your 3 point median filter (perhaps extending it to 5 or 7) and Claus' Barlett3p() to see which of them gets me closer to what I am after. > > And, from a couple of the seemingly random replies I received yesterday, it looks like I am taking up too much bandwidth here, so I'm going to back off and see how far what I've learnt will take me. > > > Many thanks for the time and patience of all those who've been helping me. > > Buk. > > ____________________________________________________________ > FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! > Check it out at http://www.inbox.com/earth > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.muehlmann at gmail.com Tue Apr 5 20:09:39 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Tue, 5 Apr 2016 20:09:39 +0200 Subject: [Scilab-users] check if variable within structure is available In-Reply-To: References: Message-ID: thanks...exactly what I was searching for. 2016-04-05 19:14 GMT+02:00 Nicolas Fezans : > Hi, > > just use: > > isfield(handles, 'I_RES') > > for that. You might want to check whether "handles" exists before > making that test, if you want to be sure that your program won't abort > execution with a non-treated error, if "handles" does not exist. > > > Nicolas > > On Tue, Apr 5, 2016 at 3:26 PM, Philipp M?hlmann > wrote: > > Is there a way to check if a variable within a structure is available? > > > > > > Example: > > > > There is a structure handle containing different variables. > > > > > > e.g: > > > > handles.status // contain Status info of different pushbuttons --> in > > fact status is a structure itself: handles.Status.pb1; > handles.Status.pb2; > > handles.I_ORG // contains original Image --> array > > handles.I_RES // contains resulting Image --> array > > > > > > Now I want to check if handles.I_RES existst > > > > > > > > exists('handles.I_RES' , 'a') will return "0" even if handles.I_RES > does > > exist > > isdef ('handles.I_RES' , 'a') will return "F" even if handles.I_RES > does > > exist > > > > > > Thank you, > > Philipp > > > > -- > > In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. > > > > There we have the salad. > > > > _______________________________________________ > > 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 > -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From scilab.20.browseruk at xoxy.net Tue Apr 5 22:36:43 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Tue, 5 Apr 2016 12:36:43 -0800 Subject: [Scilab-users] Wrong number of arguments? exclusive) to exclusive) In-Reply-To: <5703F4ED.4070709@gmail.com> References: Message-ID: Claus, > > You can convert the code for Barlett3p to a Median3p, simply by > replacing the weights (0.25 0.50 0.25) with equal weights ... i.e. 0.333 > 0.334 0.333 ... I extrapolated a barlett5p() function from your example: function [out]=bartlett5p(indata) out = indata; if length(indata) > 3 then out( 3:$-2 ) = 0.2 * indata( 1:$-4 ) + 0.2 * indata( 2:$-3 ) + 0.2 * indata( 3:$-2 ) + 0.2 * indata( 4:$-1 ) + 0.2 * indata( 5:$ ); end endfunction And tried various sets of weights: (0.1, 0.2, 0.4, 0.2, 0.2 etc.) before settling on the "median5p()" set above. The result (as shown in the attachment) is that whilst it addresses the cases where the barlett3p() leaves inflections in the dataset (albeit much reduced); it leaves inflections where the barlett3p() doesn't :( > > Someone suggested to compare the raw data with the smoothed data - and > determine persistent issues. Maybe delete the tricky data that doesn't > ensure convex space ... I think that's your best option because the > remaining data is true to your original data. If deleting a data point > is of concern - the alternative is to replace the bad data point with a > data point interpolated between the surrounding data. Yes. I'm rapidly coming to the conclusion that I need to stop looking for a continuous 'mathematical solution' to this problem and return to the prosaic, procedural code that detects negative slopes and simply deletes the points that cause them, that I had when when I first asked the question here. Since there doesn't seem to be any nice way of coding that in SciLab, and I'm vastly more comfortable in Perl, I'll code my solution there where I won't be running into anomalies that bring me back here asking dumb question every five minutes. Thanks for your time and observations; they've been very helpful. Cheers, Buk. ____________________________________________________________ Can't remember your password? Do you need a strong and secure password? Use Password manager! It stores your passwords & protects your account. Check it out at http://mysecurelogon.com/manager -------------- next part -------------- A non-text attachment was scrubbed... Name: disconsBartlett.png Type: image/png Size: 73984 bytes Desc: not available URL: From scilab.20.browseruk at xoxy.net Tue Apr 5 22:48:56 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Tue, 5 Apr 2016 12:48:56 -0800 Subject: [Scilab-users] Unwanted announcments? Message-ID: One last question before I leave y'all in peace: Is there a way to stop atomsLoad('CWA'); Announcing stuff on the command line console: C:\Motor>loessGraph TN HB1M_Core25_No_Field_No_Epoxy_800Am.initial.rdat Start Time Frequency Toolbox - (1.2.3) Load macros Load gateways Load help Load demos Start swt toolbox - (0.2.1) Load macros Load gateways Load help Load demos Start CWA toolbox Load macros Load gateways Load help Load demos when being run from the command line? Thanks, Buk. ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! From sgougeon at free.fr Tue Apr 5 23:23:16 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 5 Apr 2016 23:23:16 +0200 Subject: [Scilab-users] Unwanted announcments? In-Reply-To: References: Message-ID: <57042CC4.20509@free.fr> Le 05/04/2016 22:48, scilab.20.browseruk at xoxy.net a ?crit : > One last question before I leave y'all in peace: > > Is there a way to stop > > atomsLoad('CWA'); > > Announcing stuff on the command line console: > > C:\Motor>loessGraph TN HB1M_Core25_No_Field_No_Epoxy_800Am.initial.rdat > > Start Time Frequency Toolbox - (1.2.3) > Load macros > Load gateways > Load help > Load demos yes: in atomsGui(), you may visit each of your installed modules (File=>Installed modules), and uncheck the "Load at startup" checkbox on the bottom-left corner of their presentation page. There is certainly a way to do the same using atomsAutoloadDel(..), but with more typing (it has no "all" option :) Afterward, since your modules are still installed, it will remain possible to load them through the Toolboxes menu. Cheers Samuel From scilab.20.browseruk at xoxy.net Tue Apr 5 23:43:49 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Tue, 5 Apr 2016 13:43:49 -0800 Subject: [Scilab-users] Unwanted announcments? In-Reply-To: <57042CC4.20509@free.fr> References: Message-ID: >> One last question before I leave y'all in peace: >> >> Is there a way to stop >> >> atomsLoad('CWA'); >> >> Announcing stuff on the command line console: >> >> C:\Motor>loessGraph TN >> HB1M_Core25_No_Field_No_Epoxy_800Am.initial.rdat >> >> Start Time Frequency Toolbox - (1.2.3) >> Load macros >> Load gateways >> Load help >> Load demos > yes: in atomsGui(), you may visit each of your installed modules > (File=>Installed modules), and uncheck the "Load at startup" checkbox on > the bottom-left corner of their presentation page. > There is certainly a way to do the same using atomsAutoloadDel(..), but > with more typing (it has no "all" option :) > > Afterward, since your modules are still installed, it will remain > possible to load them through the Toolboxes menu. Sorry Samuel, I guess I didn't word my question clearly. This is not when the packages are autoloaded (which I already had turned off); but when they are explicitly loaded by the script I'm runnng from the command line, using atomsLoad('CWA'); within that script. > > Cheers > Samuel > Buk ____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop! Check it out at http://www.inbox.com/earth From sgougeon at free.fr Tue Apr 5 23:57:12 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 5 Apr 2016 23:57:12 +0200 Subject: [Scilab-users] Unwanted announcments? In-Reply-To: References: Message-ID: <570434B8.8040505@free.fr> Le 05/04/2016 23:43, scilab.20.browseruk at xoxy.net a ?crit : > .../... > Sorry Samuel, I guess I didn't word my question clearly. > > This is not when the packages are autoloaded (which I already had turned off); but when they are explicitly loaded by the script I'm runnng from the command line, using atomsLoad('CWA'); within that script. Unfortunately there is no way to cancel this verbose mode. Things are unconditionally printed from the ~\etc\.start files. From cfuttrup at gmail.com Wed Apr 6 09:30:54 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Wed, 6 Apr 2016 09:30:54 +0200 Subject: [Scilab-users] Wrong number of arguments? exclusive) to exclusive) In-Reply-To: References: <5703F4ED.4070709@gmail.com> Message-ID: Hi Buk There are very nice features in Scilab to do the selective deletion of data. For example make an array of boolean and extract good data. BTW, I think I speak for the majority when I say it's Ok to post lots of mails into the mailing list. Don't worry. Nobody wish for a "dead quiet" mailing list :-) Best regards, Claus On Apr 5, 2016 22:38, wrote: > Claus, > > > > You can convert the code for Barlett3p to a Median3p, simply by > > replacing the weights (0.25 0.50 0.25) with equal weights ... i.e. 0.333 > > 0.334 0.333 ... > > I extrapolated a barlett5p() function from your example: > function [out]=bartlett5p(indata) > out = indata; > if length(indata) > 3 then > out( 3:$-2 ) = 0.2 * indata( 1:$-4 ) + 0.2 * indata( 2:$-3 ) + > 0.2 * indata( 3:$-2 ) + 0.2 * indata( 4:$-1 ) + 0.2 * indata( 5:$ ); > end > endfunction > > And tried various sets of weights: (0.1, 0.2, 0.4, 0.2, 0.2 etc.) before > settling on the "median5p()" set above. > > The result (as shown in the attachment) is that whilst it addresses the > cases where the barlett3p() leaves inflections in the dataset (albeit much > reduced); it leaves inflections where the barlett3p() doesn't :( > > > > > Someone suggested to compare the raw data with the smoothed data - and > > determine persistent issues. Maybe delete the tricky data that doesn't > > ensure convex space ... I think that's your best option because the > > remaining data is true to your original data. If deleting a data point > > is of concern - the alternative is to replace the bad data point with a > > data point interpolated between the surrounding data. > > Yes. I'm rapidly coming to the conclusion that I need to stop looking for > a continuous 'mathematical solution' to this problem and return to the > prosaic, procedural code that detects negative slopes and simply deletes > the points that cause them, that I had when when I first asked the question > here. > > Since there doesn't seem to be any nice way of coding that in SciLab, and > I'm vastly more comfortable in Perl, I'll code my solution there where I > won't be running into anomalies that bring me back here asking dumb > question every five minutes. > > Thanks for your time and observations; they've been very helpful. > > Cheers, Buk. > > ____________________________________________________________ > Can't remember your password? Do you need a strong and secure password? > Use Password manager! It stores your passwords & protects your account. > Check it out at http://mysecurelogon.com/manager > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Wed Apr 6 13:06:21 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 6 Apr 2016 13:06:21 +0200 Subject: [Scilab-users] Wrong number of arguments? exclusive) In-Reply-To: <5703F4ED.4070709@gmail.com> References: <5703F4ED.4070709@gmail.com> Message-ID: For sake of accuracy in detriment of bandwidth: setting equal weights in Bartlett3p should produce a 3-point moving average (mean) filter, not a median filter From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Claus Futtrup Sent: Tuesday, April 05, 2016 7:25 PM To: users at lists.scilab.org Subject: Re: [Scilab-users] Wrong number of arguments? exclusive) Hi Buk >your 3 point median filter (perhaps extending it to 5 or 7) and Claus' Barlett3p() Well, if the median filter doesn't solve the problem ... then for sure the Bartlett window will also not solve the problem - it was meant to be the least intrusive (most true to the original data) smoothing you could possibly do. I had major success with a Bartlett window, where I had a frequency response, did an inverse-discrete Fourier Transform (IDFT) ... and I used only 128 points (to reduce calculation time) so that time response had some zig-zag patterns - the Barlett window made a fantastic smooth result. Each smoothing window has its strengths and weaknesses. You can convert the code for Barlett3p to a Median3p, simply by replacing the weights (0.25 0.50 0.25) with equal weights ... i.e. 0.333 0.334 0.333 ... Someone suggested to compare the raw data with the smoothed data - and determine persistent issues. Maybe delete the tricky data that doesn't ensure convex space ... I think that's your best option because the remaining data is true to your original data. If deleting a data point is of concern - the alternative is to replace the bad data point with a data point interpolated between the surrounding data. /Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From noguchi at kje.biglobe.ne.jp Wed Apr 6 13:59:26 2016 From: noguchi at kje.biglobe.ne.jp (noguchi) Date: Wed, 6 Apr 2016 04:59:26 -0700 (MST) Subject: [Scilab-users] FACT 0.6-1: error message Message-ID: <1459943966373-4033929.post@n3.nabble.com> I am using twoPCs. One PC has Salab 5.5.0 / FACT 0.4-3 and othe PC has Scilab 5.5.2 / FACT 0.6-1. Attached scn file works with FACT 0.4-3. However, it doesn't work with FACT 0.6-1 and get following error message: -->exec('C:\Users\noguc\Desktop\Modeling\?????\Scilab?????????\Scilab_Manuals\FACT_getting_started\data\Fact_nir_exe01_Linear_Regression.sce', -1) curves(nir.x(3,:),'b','NIR Wave Length [nano !--error 144 ?????????????????????????. ?? %l_e ?????????????????????. at line 10 of exec file called by : r_Regression.sce', -1 It seems that "Curves" command doesn't work on FACT 0.6-1. Could you please advise me how I should avoid this error message? Thanks. Y. Noguchi Fact_nir_exe01_Linear_Regression.sce -- View this message in context: http://mailinglists.scilab.org/FACT-0-6-1-error-message-tp4033929.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Wed Apr 6 17:08:30 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 6 Apr 2016 17:08:30 +0200 Subject: [Scilab-users] Get the module name a built-in function belongs to Message-ID: <5705266D.7070609@free.fr> Hello, Is there a way to get the module name a built-in function belongs to? A somewhat equivalence of whereis(), but for built-in? With Scilab 5, readgateway() was available and with getmodules() it was somewhat possible to comb modules and finally find the one having the built-in. But readgateway() is not reinstalled in Scilab 6. By the way, extending whereis() to built-in function would be useful, in order to avoid doing these acrobatics with getmodules() and the former readgateway() in a public way ;) Thanks for any hints Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Apr 6 17:58:00 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 6 Apr 2016 17:58:00 +0200 Subject: [Scilab-users] xsetech, plot and background In-Reply-To: <1458658242610-4033821.post@n3.nabble.com> References: <1458658242610-4033821.post@n3.nabble.com> Message-ID: <57053208.9070606@free.fr> Hello, Le 22/03/2016 15:50, anna78 a ?crit : > Hi all, > > I'm making the attached figure using the following code. > Can you help me to take out the bad white background appearing in the last > (other time in both) the subplots? > > thanks! > Anna > > clf(1); > //f=gcf(); // macro shortcut <=> f=get("current_figure") > f=figure(1); // creo figure con id=1 > f.figure_position=[200,0] > f.figure_size=[800,700] > f.figure_name=particle+' monitoring (hour average)'; > > subplot(211) > xtitle(particle+" mean position @ PUB - hour average"); > xsetech([0,0,0.8,0.4]); > //g=gcf(); > //g.background=0; > xlabel('timestamp (yymmddhh)'); > ylabel('[mm]'); > plot(xMean,'r.','markersiz',3); > plot(yMean,'k.','markersiz',3); > xgrid(0); //0=black; 2=blue; > > subplot(212) > xtitle(particle+" standard deviation @ PUB - hour average"); > xsetech([0,0.5,0.8,0.4]); > xlabel('timestamp (yymmddhh)'); > ylabel('[mm]'); > plot(xDevSt,'r.','markersiz',3); > plot(yDevSt,'k.','markersiz',3); > // > xgrid(0); //0=black; 2=blue; . > > > After each subplot, you may tune the right margin with ax = gca(); ax.margins(2) = 0.2; and cancel the xsetech() lines. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Apr 6 18:25:16 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 6 Apr 2016 18:25:16 +0200 Subject: [Scilab-users] xsetech, plot and background In-Reply-To: <1458658242610-4033821.post@n3.nabble.com> References: <1458658242610-4033821.post@n3.nabble.com> Message-ID: <5705386C.4010209@free.fr> Le 22/03/2016 15:50, anna78 a ?crit : > Hi all, > > I'm making the attached figure using the following code. > Can you help me to take out the bad white background appearing in the last > (other time in both) the subplots? > > thanks! > Anna > > clf(1); > //f=gcf(); // macro shortcut <=> f=get("current_figure") > f=figure(1); // creo figure con id=1 > f.figure_position=[200,0] > f.figure_size=[800,700] > f.figure_name=particle+' monitoring (hour average)'; > > subplot(211) > xtitle(particle+" mean position @ PUB - hour average"); > xsetech([0,0,0.8,0.4]); > //g=gcf(); > //g.background=0; > xlabel('timestamp (yymmddhh)'); > ylabel('[mm]'); > plot(xMean,'r.','markersiz',3); > plot(yMean,'k.','markersiz',3); > xgrid(0); //0=black; 2=blue; > > subplot(212) > xtitle(particle+" standard deviation @ PUB - hour average"); > xsetech([0,0.5,0.8,0.4]); > xlabel('timestamp (yymmddhh)'); > ylabel('[mm]'); > plot(xDevSt,'r.','markersiz',3); > plot(yDevSt,'k.','markersiz',3); > // > xgrid(0); //0=black; 2=blue; . > > > Another even simpler way is to replace the subplot() lines with the xsetech() ones. xsetech() is a kind of customized subplot() function. It is useless to call both subplot() and xsetech(). -------------- next part -------------- An HTML attachment was scrubbed... URL: From marek.havrilla at gmail.com Wed Apr 6 18:35:12 2016 From: marek.havrilla at gmail.com (laftek) Date: Wed, 6 Apr 2016 09:35:12 -0700 (MST) Subject: [Scilab-users] Phase shift and step size - electrical (XCOS) In-Reply-To: <56FFCDE1.2000500@ieee.org> References: <1458594914582-4033797.post@n3.nabble.com> <56F0680D.2040507@gmail.com> <1459536107077-4033886.post@n3.nabble.com> <56FFCDE1.2000500@ieee.org> Message-ID: <1459960512557-4033933.post@n3.nabble.com> Thanks for your response. Yes I saw max step option there but its not what i need because i need exact value so I can put it into formula. Setting sampling time of scope does not set sample time in calculations it sets sample time only in drawing graph so it may looks nicer but values can be different. Michael J McCann wrote > With regard to the operations of multiply and divide I'd say "be > careful" because a division is a strange thing to have in a real > physical system so I'd be looking at your understanding of the system > you were modelling and ask why it appears at all. I agree. I have to look at it really close to understand. Now I am trying to find time in minimum or maximum. Can you help me ? Is there some block that I can use ? Thanks in advance. -- View this message in context: http://mailinglists.scilab.org/Phase-shift-and-step-size-in-XCOS-electrical-tp4033797p4033933.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From scilab.20.browseruk at xoxy.net Thu Apr 7 03:38:06 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Wed, 6 Apr 2016 17:38:06 -0800 Subject: [Scilab-users] Wrong number of arguments? exclusive) to exclusive) In-Reply-To: References: <5703f4ed.4070709@gmail.com> Message-ID: Rafeal, Looking back I realise that I may have appeared that I dismissed your suggestion without reason. Please see the attachment for an example of the problems I encountered when I ran your code against a bunch of files. Thank you for your time and expertise in assisting me, Buk. ____________________________________________________________ Receive Notifications of Incoming Messages Easily monitor multiple email accounts & access them with a click. Visit http://www.inbox.com/notifier and check it out! -------------- next part -------------- A non-text attachment was scrubbed... Name: discons?poinMedian.png Type: image/png Size: 36633 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Thu Apr 7 11:08:47 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 7 Apr 2016 11:08:47 +0200 Subject: [Scilab-users] Wrong number of arguments? exclusive) to exclusive) In-Reply-To: References: <5703f4ed.4070709@gmail.com> Message-ID: Hi Buk. I think that for your data, the Loess (or Lowess) technique provided superior results. Why does it not suit you? Note that the parameters used in my plots were smoothing=0.03 (not 0.3) and order=2 or 3 but I would recommend using order=1 or 2 instead. PS: regarding the 3-point median example in your last email, you did not remove the +5e-3 shift as I told you to do (this was introduced for display purposes in the first code sample). Rgds Rafael ----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of scilab.20.browseruk at xoxy.net Sent: Thursday, April 07, 2016 3:38 AM To: users at lists.scilab.org Subject: Re: [Scilab-users] Wrong number of arguments? exclusive) to exclusive) Rafeal, Looking back I realise that I may have appeared that I dismissed your suggestion without reason. Please see the attachment for an example of the problems I encountered when I ran your code against a bunch of files. Thank you for your time and expertise in assisting me, Buk. ____________________________________________________________ Receive Notifications of Incoming Messages Easily monitor multiple email accounts & access them with a click. Visit http://www.inbox.com/notifier and check it out! From amonmayr at laas.fr Sat Apr 9 16:34:06 2016 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Sat, 09 Apr 2016 16:34:06 +0200 Subject: [Scilab-users] =?utf-8?q?porting_an_atom_module_from_5=2E5=2Ex=3F?= =?utf-8?b?PT0/dXRmLTg/cT8gLT4gNi4w?= Message-ID: <4ad0-57091300-b-48773e00@214559394> Hi everyone, I just tried to install in 6.0 an atom module developed by one of my colleagues for 5.5.X, without success. I tough naively that just bumping the version requirement from 5.X wih X>=2 to X.0 with X>=6, in addition to small fixes in the loader/builder would do it but I was wrong. As anyone ported 5.5 modules to 6.0? Any piece of advice or tutorial on the best way to do it? Thanks in advance for your help, Antoine From grocer.toolbox at gmail.com Sat Apr 9 19:14:13 2016 From: grocer.toolbox at gmail.com (Eric Dubois) Date: Sat, 9 Apr 2016 19:14:13 +0200 Subject: [Scilab-users] porting an atom module from 5.5.x?==?utf-8?q? -> 6.0 In-Reply-To: <4ad0-57091300-b-48773e00@214559394> References: <4ad0-57091300-b-48773e00@214559394> Message-ID: Hello Antoine I am not sure of you mean exactly by "porting an atom module", but as for me I have managed to install my Scilab toolbox (grocer) on Scilab 6.0, with small adaptations to the builder.sce file and changes to the code, in particular to make my functions contnue to work properly after the change made to the behaviour of an addition with an empty matrix. ?ric. 2016-04-09 16:34 GMT+02:00 Antoine Monmayrant : > Hi everyone, > > I just tried to install in 6.0 an atom module developed by one of my > colleagues for 5.5.X, without success. > I tough naively that just bumping the version requirement from 5.X wih > X>=2 to X.0 with X>=6, in addition to small fixes in the loader/builder > would do it but I was wrong. > As anyone ported 5.5 modules to 6.0? > Any piece of advice or tutorial on the best way to do it? > > Thanks in advance for your help, > > Antoine > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.strelkov at gmail.com Sat Apr 9 21:22:08 2016 From: n.strelkov at gmail.com (Nikolay Strelkov) Date: Sat, 9 Apr 2016 22:22:08 +0300 Subject: [Scilab-users] porting an atom module from 5.5.x?==?utf-8?q? -> 6.0 In-Reply-To: <4ad0-57091300-b-48773e00@214559394> References: <4ad0-57091300-b-48773e00@214559394> Message-ID: Dear Antoine! I think you can start with toolbox_skeleton for Scilab 6 . With best regards, maintainer and developer of Mathieu functions toolbox for Scilab, IEEE member, Ph.D., Nikolay Strelkov. 2016-04-09 17:34 GMT+03:00 Antoine Monmayrant : > Hi everyone, > > I just tried to install in 6.0 an atom module developed by one of my > colleagues for 5.5.X, without success. > I tough naively that just bumping the version requirement from 5.X wih > X>=2 to X.0 with X>=6, in addition to small fixes in the loader/builder > would do it but I was wrong. > As anyone ported 5.5 modules to 6.0? > Any piece of advice or tutorial on the best way to do it? > > Thanks in advance for your help, > > Antoine > > _______________________________________________ > 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 Sun Apr 10 02:06:46 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 10 Apr 2016 02:06:46 +0200 Subject: [Scilab-users] porting an atom module from 5.5.x?==?utf-8?q? -> 6.0 In-Reply-To: <4ad0-57091300-b-48773e00@214559394> References: <4ad0-57091300-b-48773e00@214559394> Message-ID: <57099916.4080200@free.fr> Hi Antoine, Le 09/04/2016 16:34, Antoine Monmayrant a ?crit : > Hi everyone, > > I just tried to install in 6.0 an atom module developed by one of my colleagues for 5.5.X, without success. Which problem have you met? > I tough naively that just bumping the version requirement from 5.X wih X>=2 to X.0 with X>=6, in addition to small fixes in the loader/builder would do it but I was wrong. > As anyone ported 5.5 modules to 6.0? Yes, "uman" is available for both versions. It has only a library of Scilab functions (so-called "macros"). The only difference -- for the binary, that i have created myself and uploaded as is -- is that each library must be compiled with genlib() of the given version, because the libraries packaging has changed between 5 and 6. And that's all. Sources are identical (with small adaptations to 6.0, avoiding using features that work only with 6.0 such that recursive extraction ; otherwise, then testing the version and switching the processing accordingly) . So, if your module has only Scilab functions, you may just genlib() its ~\macros\ directory and try with the updated library. If the module has a gateway, i guess that it shall have as well to be recompiled with the proper compiler(s). Regards Samuel From sgougeon at free.fr Mon Apr 11 07:27:49 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 11 Apr 2016 07:27:49 +0200 Subject: [Scilab-users] [a, ,c] = ... : skipping a recipient Message-ID: <570B35D5.7020000@free.fr> Hello, With Scilab 6, [a, ,c] = (%pi, %z, "Text") sets c = %z instead of c = "Text". Is it expected, or is it a bug? Is there a way to skip a recipient with respect to its source? Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Apr 11 07:31:23 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 11 Apr 2016 07:31:23 +0200 Subject: [Scilab-users] Get the module name a built-in function belongs to In-Reply-To: <5705266D.7070609@free.fr> References: <5705266D.7070609@free.fr> Message-ID: <570B36AB.4030706@free.fr> Le 06/04/2016 17:08, Samuel Gougeon a ?crit : > Hello, > > Is there a way to get the module name a built-in function belongs to? > A somewhat equivalence of whereis(), but for built-in? > With Scilab 5, readgateway() was available and with getmodules() it > was somewhat possible to comb modules and finally find the one having > the built-in. > But readgateway() is not reinstalled in Scilab 6. > By the way, extending whereis() to built-in function would be useful, > in order to avoid doing these acrobatics with getmodules() and the > former readgateway() in a public way ;) . Actually, the documentation is not updated and i haven't tested it before posting, but it is already the case: --> whereis(size) ans = elementary_functions Fine! -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Mon Apr 11 12:46:36 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 11 Apr 2016 12:46:36 +0200 Subject: [Scilab-users] SciNotes disappeared Message-ID: <570B808C.4080805@durietz.se> Hello, suddenly I could not start SciNotes. Before, I had by mistake dragged a bin-file instead of a sci-file to the SciNotes window and it crashed. However, after a restart of SciNotes it worked for a while. But after a restart of Scilab: -->scinotes --> and nothing happens. What can I do (Scilab 5.5.2, Xubuntu 14.04)? Regards Stefan From paul.bignier at scilab-enterprises.com Mon Apr 11 14:01:31 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Mon, 11 Apr 2016 14:01:31 +0200 Subject: [Scilab-users] SciNotes disappeared In-Reply-To: <570B808C.4080805@durietz.se> References: <570B808C.4080805@durietz.se> Message-ID: <570B921B.9060709@scilab-enterprises.com> Hello, You may delete you SCIHOME folder, that way SciNotes' config will be renewed. Regards, Paul On 04/11/2016 12:46 PM, Stefan Du Rietz wrote: > Hello, > suddenly I could not start SciNotes. Before, I had by mistake dragged > a bin-file instead of a sci-file to the SciNotes window and it > crashed. However, after a restart of SciNotes it worked for a while. > But after a restart of Scilab: > > -->scinotes > > --> > > and nothing happens. What can I do (Scilab 5.5.2, Xubuntu 14.04)? > > Regards > Stefan > _______________________________________________ > 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.68 http://www.scilab-enterprises.com From j-lan at online.no Mon Apr 11 15:10:32 2016 From: j-lan at online.no (=?UTF-8?Q?Jan-=c3=85ge_Langeland?=) Date: Mon, 11 Apr 2016 15:10:32 +0200 Subject: [Scilab-users] [a, ,c] = ... : skipping a recipient In-Reply-To: <570B35D5.7020000@free.fr> References: <570B35D5.7020000@free.fr> Message-ID: <570BA248.7050305@online.no> On 11.04.2016 07:27, Samuel Gougeon wrote: > Hello, > > With Scilab 6, [a, ,c] = (%pi, %z, "Text") sets c = %z instead of c > = "Text". > Is it expected, or is it a bug? > Is there a way to skip a recipient with respect to its source? > > Samuel > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users Some surprises here: --> [a]=(1,2,3) a = 1. --> [[],[],b]=(1,2,3) b = 3. unknown script form -->a=(1,2,3) //Crashes Scilab 6.0.0-beta-1 Jan ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Apr 11 20:54:34 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 11 Apr 2016 20:54:34 +0200 Subject: [Scilab-users] [a, ,c] = ... : skipping a recipient In-Reply-To: <570BA248.7050305@online.no> References: <570B35D5.7020000@free.fr> <570BA248.7050305@online.no> Message-ID: <570BF2EA.6080707@free.fr> Le 11/04/2016 15:10, Jan-?ge Langeland a ?crit : > > On 11.04.2016 07:27, Samuel Gougeon wrote: >> Hello, >> >> With Scilab 6, [a, ,c] = (%pi, %z, "Text") sets c = %z instead of c >> = "Text". >> Is it expected, or is it a bug? >> Is there a way to skip a recipient with respect to its source? >> >> Samuel > > Some surprises here: > > --> [a]=(1,2,3) > a = > 1. Indeed. Surprisingly, assignments are done from right to left!, with Scilab 5.5.2 as well as with Scilab 6: --> [a, b, a] = (%pi, %t, "test") a = test b = T a = 3.1415927 But when the list of recipients is shorter, only the left sources are considered: --> [a, b] = (%pi, %t, "test") b = T a = 3.1415927 Quite counter-intuitive. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdr at durietz.se Mon Apr 11 22:21:50 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 11 Apr 2016 22:21:50 +0200 Subject: [Scilab-users] SciNotes disappeared In-Reply-To: <570B921B.9060709@scilab-enterprises.com> References: <570B808C.4080805@durietz.se> <570B921B.9060709@scilab-enterprises.com> Message-ID: <570C075E.4090209@durietz.se> Hello Paul, thanks for the answer. Because I had all my own libraries there, I could not just delete the folder. I deleted scinotesConfiguration.xml and restarted Scilab to no avail. I made a backup of SCIHOME, deleted it and then restored most of it. After that it is again working. But why did it happen? Regards Stefan On 2016-04-11 14:01, Paul Bignier wrote: > > Hello, > > You may delete you SCIHOME folder, that way SciNotes' config will be > renewed. > > Regards, > Paul > > On 04/11/2016 12:46 PM, Stefan Du Rietz wrote: >> Hello, >> suddenly I could not start SciNotes. Before, I had by mistake >> dragged a bin-file instead of a sci-file to the SciNotes window and >> it crashed. However, after a restart of SciNotes it worked for a >> while. But after a restart of Scilab: >> >> -->scinotes >> >> --> >> >> and nothing happens. What can I do (Scilab 5.5.2, Xubuntu 14.04)? >> >> Regards >> Stefan >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > From paul.bignier at scilab-enterprises.com Tue Apr 12 08:51:52 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Tue, 12 Apr 2016 08:51:52 +0200 Subject: [Scilab-users] SciNotes disappeared In-Reply-To: <570C075E.4090209@durietz.se> References: <570B808C.4080805@durietz.se> <570B921B.9060709@scilab-enterprises.com> <570C075E.4090209@durietz.se> Message-ID: <570C9B08.9070909@scilab-enterprises.com> Glad to hear! I don't know, but please report a bug if you manage to reproduce. Best, Paul On 04/11/2016 10:21 PM, Stefan Du Rietz wrote: > Hello Paul, > thanks for the answer. > > Because I had all my own libraries there, I could not just delete the > folder. > > I deleted scinotesConfiguration.xml and restarted Scilab to no avail. > > I made a backup of SCIHOME, deleted it and then restored most of it. > After that it is again working. > > But why did it happen? > > Regards > Stefan > > > On 2016-04-11 14:01, Paul Bignier wrote: >> >> Hello, >> >> You may delete you SCIHOME folder, that way SciNotes' config will be >> renewed. >> >> Regards, >> Paul >> >> On 04/11/2016 12:46 PM, Stefan Du Rietz wrote: >>> Hello, >>> suddenly I could not start SciNotes. Before, I had by mistake >>> dragged a bin-file instead of a sci-file to the SciNotes window and >>> it crashed. However, after a restart of SciNotes it worked for a >>> while. But after a restart of Scilab: >>> >>> -->scinotes >>> >>> --> >>> >>> and nothing happens. What can I do (Scilab 5.5.2, Xubuntu 14.04)? >>> >>> Regards >>> Stefan >>> _______________________________________________ >>> 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 -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Graham.Bartlett at elektron-technology.com Tue Apr 12 14:30:42 2016 From: Graham.Bartlett at elektron-technology.com (Graham Bartlett) Date: Tue, 12 Apr 2016 12:30:42 +0000 Subject: [Scilab-users] Xcos - names/labels for subsystems and ports? Message-ID: <886141A8F6CAB54583133B591DD9B35A2A658A0D@ELEKGROUP-MBS1.ElektronGroup.local> I've done quite a lot of work with Matlab and Simulink in previous jobs. At my new place, I'm checking out Xcos (and hence Scilab) as a free alternative to Simulink, partly on principle, and partly so our team aren't constrained by bean-counters telling us how many development seats we can afford. :) What's currently bugging me with Xcos is subsystem and signal labelling, which are fundamental to building a design that's maintainable. There are a few newbie things I'm trying to work out with this, none of which I've managed to find in the Xcos tutorials, help docs, or the wiki. I went looking for a mailing list FAQ but I didn't see one. 1) The first one should be simple. How do I make signals default to horizontal instead of rat's-nest (point-to-point)? 2) Perhaps related to that, is it possible to manually drag signals to where I want them to be laid out? Some time back I used VisSim (for another example) - that also routed signals automatically, but it had a "wiring" block which let you direct them via a particular point. I can't find anything like that in Xcos. Of course I can use from/goto blocks where the automatic layout doesn't look good, or I could use unity gains or single-input sum blocks as a hack to force signals through some point without changing them, but none of that is really ideal. My rule of thumb is that if the design layout looks messy or rushed then the thought processes involved probably were too, and that makes me worried. 3) In Simulink, I can put labels on inputs and outputs. If I've got a subsystem calculating biquad filter coefficients, say, I can label the inputs "cornerFreq", "qFactor" and "sampleTime", and the outputs as "b0/b1/b2/a0/a1/a2". When I drop an instance of that subsystem into a diagram, those names will appear next to the inputs/outputs. That makes the design clearer, instead of having to dig into the subsystem and look for annotion text in there (or worse, figure it out directly from the design itself). Is there a way to make Xcos subsystems do this? 4) Simulink lets you put names on signal flows as they come out of an output. As the signal flow goes through the design, Simulink labels the signal. Typically you'd give this a variable name. Auto-coding can then use that variable name, or if you're coding up a design manually then you can use that name. I can see the "Kalman" demo doing something like this (or perhaps like point 2, I can't tell), but I can't find anywhere how those names for flows are set up. 5) Masks. If it's your own block, Simulink lets you look at the subsystem under the mask. Xcos lets you put a mask on a block, but I can't then see any way to look at the subsystem under the mask, except by completely deleting the mask. For us mere mortals whose designs don't always work first time every time, this could be a problem. Thanks folks. Graham. ------------------------------------------------------------------------- The information contained in this email may be privileged and is intended for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this email in error and that any review, dissemination or copying of this message is strictly prohibited. If you have received this email in error, please notify us immediately. This message and any attachments are believed to be free of any virus or defect that might affect any computer system into which it is received and opened. However, it is the responsibility of the recipient to ensure that it is virus free; therefore, no responsibility is accepted for any loss or damage in any way arising from its use. --------------------------------------------------------------------------- Elektron Technology plc Registered in England No.448274. Broers Building, 21 JJ Thomson Avenue, Cambridge, CB3 0FA From paul.bignier at scilab-enterprises.com Tue Apr 12 16:39:39 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Tue, 12 Apr 2016 16:39:39 +0200 Subject: [Scilab-users] Xcos - names/labels for subsystems and ports? In-Reply-To: <886141A8F6CAB54583133B591DD9B35A2A658A0D@ELEKGROUP-MBS1.ElektronGroup.local> References: <886141A8F6CAB54583133B591DD9B35A2A658A0D@ELEKGROUP-MBS1.ElektronGroup.local> Message-ID: <570D08AB.7010403@scilab-enterprises.com> Hello Graham, Pleased to hear that you're using Xcos, it's always good to have feedback! 1) Right-clicking a "link" (which you call "signal") pops "Format" and "Link style" menus which enables you to label/color it as well as using automatic layouts (also accessible via keyboard shortcuts). 2) When dragging a link from a port, you can click in the diagram at random points. Those will be "control points" through which the link will pass regardless of the position of its connecting blocks. You may play with the demos to check it out. 3) If you want to label ports at the moment, you need to define your own block and set its graphics.in_label & graphics.out_label in its interface function (typically, the ones in modules/scicos_blocks/macros/*). 4) That goes with the 1). 5) I don't understand why you would mask a superblock before designing it properly. Masks are meant to be created once your block is stable, so there's something I'm missing here. Hope this helps! Regars, Paul On 04/12/2016 02:30 PM, Graham Bartlett wrote: > I've done quite a lot of work with Matlab and Simulink in previous jobs. At my new place, I'm checking out Xcos (and hence Scilab) as a free alternative to Simulink, partly on principle, and partly so our team aren't constrained by bean-counters telling us how many development seats we can afford. :) > > What's currently bugging me with Xcos is subsystem and signal labelling, which are fundamental to building a design that's maintainable. There are a few newbie things I'm trying to work out with this, none of which I've managed to find in the Xcos tutorials, help docs, or the wiki. I went looking for a mailing list FAQ but I didn't see one. > > 1) The first one should be simple. How do I make signals default to horizontal instead of rat's-nest (point-to-point)? > > 2) Perhaps related to that, is it possible to manually drag signals to where I want them to be laid out? Some time back I used VisSim (for another example) - that also routed signals automatically, but it had a "wiring" block which let you direct them via a particular point. I can't find anything like that in Xcos. Of course I can use from/goto blocks where the automatic layout doesn't look good, or I could use unity gains or single-input sum blocks as a hack to force signals through some point without changing them, but none of that is really ideal. My rule of thumb is that if the design layout looks messy or rushed then the thought processes involved probably were too, and that makes me worried. > > 3) In Simulink, I can put labels on inputs and outputs. If I've got a subsystem calculating biquad filter coefficients, say, I can label the inputs "cornerFreq", "qFactor" and "sampleTime", and the outputs as "b0/b1/b2/a0/a1/a2". When I drop an instance of that subsystem into a diagram, those names will appear next to the inputs/outputs. That makes the design clearer, instead of having to dig into the subsystem and look for annotion text in there (or worse, figure it out directly from the design itself). Is there a way to make Xcos subsystems do this? > > 4) Simulink lets you put names on signal flows as they come out of an output. As the signal flow goes through the design, Simulink labels the signal. Typically you'd give this a variable name. Auto-coding can then use that variable name, or if you're coding up a design manually then you can use that name. I can see the "Kalman" demo doing something like this (or perhaps like point 2, I can't tell), but I can't find anywhere how those names for flows are set up. > > 5) Masks. If it's your own block, Simulink lets you look at the subsystem under the mask. Xcos lets you put a mask on a block, but I can't then see any way to look at the subsystem under the mask, except by completely deleting the mask. For us mere mortals whose designs don't always work first time every time, this could be a problem. > > Thanks folks. > > Graham. > > ------------------------------------------------------------------------- > The information contained in this email may be privileged and is intended for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this email in error and that any review, dissemination or copying of this message is strictly prohibited. If you have received this email in error, please notify us immediately. > This message and any attachments are believed to be free of any virus or defect that might affect any computer system into which it is received and opened. However, it is the responsibility of the recipient to ensure that it is virus free; therefore, no responsibility is accepted for any loss or damage in any way arising from its use. > --------------------------------------------------------------------------- > Elektron Technology plc > Registered in England No.448274. > Broers Building, 21 JJ Thomson Avenue, Cambridge, CB3 0FA > _______________________________________________ > 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.68 http://www.scilab-enterprises.com From Graham.Bartlett at elektron-technology.com Tue Apr 12 16:42:13 2016 From: Graham.Bartlett at elektron-technology.com (Graham B) Date: Tue, 12 Apr 2016 07:42:13 -0700 (MST) Subject: [Scilab-users] Xcos - names/labels for subsystems and ports? In-Reply-To: <886141A8F6CAB54583133B591DD9B35A2A658A0D@ELEKGROUP-MBS1.ElektronGroup.local> References: <886141A8F6CAB54583133B591DD9B35A2A658A0D@ELEKGROUP-MBS1.ElektronGroup.local> Message-ID: <1460472133181-4033972.post@n3.nabble.com> Answering my own questions on a couple of points... 1) Default signal style. In the Scilab console, go to "Edit - Preferences". On the left pane, select "Xcos - Edition". One of the preferences there is "Link style". 2a) Moving signals around for better layout. You kind of can, although not completely. In horizontal mode you can move the vertical part of the signal flow left/right. Similarly in vertical mode you can move the horizontal part up/down. You can't do more than that though. And I've yet to find anything which gives me the ability to add more vertices on horizontal/vertical lines. 2b) In straight mode, you can add as many vertices as you want. You can also double-click on a line to add another vertex. I can't find any way to get rid of vertices though. In straight-line mode it's going to be harder to make your layout look neat too. -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Xcos-names-labels-for-subsystems-and-ports-tp4033970p4033972.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From pierre-aime.agnel at scilab-enterprises.com Tue Apr 12 16:55:04 2016 From: pierre-aime.agnel at scilab-enterprises.com (=?UTF-8?Q?Pierre-Aim=c3=a9_Agnel?=) Date: Tue, 12 Apr 2016 16:55:04 +0200 Subject: [Scilab-users] Xcos - names/labels for subsystems and ports? In-Reply-To: <570D08AB.7010403@scilab-enterprises.com> References: <886141A8F6CAB54583133B591DD9B35A2A658A0D@ELEKGROUP-MBS1.ElektronGroup.local> <570D08AB.7010403@scilab-enterprises.com> Message-ID: <570D0C48.1000007@scilab-enterprises.com> Hi, Le 12/04/2016 16:39, Paul Bignier a ?crit : > > Hello Graham, > > Pleased to hear that you're using Xcos, it's always good to have > feedback! > > 1) Right-clicking a "link" (which you call "signal") pops "Format" and > "Link style" menus which enables you to label/color it as well as > using automatic layouts (also accessible via keyboard shortcuts). > > 2) When dragging a link from a port, you can click in the diagram at > random points. Those will be "control points" through which the link > will pass regardless of the position of its connecting blocks. You may > play with the demos to check it out. > > 3) If you want to label ports at the moment, you need to define your > own block and set its graphics.in_label & graphics.out_label in its > interface function (typically, the ones in > modules/scicos_blocks/macros/*). > > 4) That goes with the 1). > > 5) I don't understand why you would mask a superblock before designing > it properly. Masks are meant to be created once your block is stable, > so there's something I'm missing here. > For 5) it's quite natural to design a system it a top-down approach where you consider a subsystem as a black-box first, set up the requirements for this black box and how it will interact with the system as a whole, then design, or have designed, the inside of your black box. This enables a parallel workflow where an integrator can verify the behaviour and simulate the whole system when all parts are ready. Xcos is rather bottom-up because of the model verification for simulation done each time you insert a block. In a sense, Xcos is more suitted for writing what's inside the black-box than for designing whole sytems where you typically less constrained by simulability but want to have a link to requirements, traceability, verification & validation, tests, costs etc. This could also be a good idea to have black-box for import of other models (I think FMU here). You don't have the implementation for a subsystem but want to consider its input/output. > Hope this helps! > Regars, > Paul > > On 04/12/2016 02:30 PM, Graham Bartlett wrote: >> I've done quite a lot of work with Matlab and Simulink in previous >> jobs. At my new place, I'm checking out Xcos (and hence Scilab) as a >> free alternative to Simulink, partly on principle, and partly so our >> team aren't constrained by bean-counters telling us how many >> development seats we can afford. :) >> >> What's currently bugging me with Xcos is subsystem and signal >> labelling, which are fundamental to building a design that's >> maintainable. There are a few newbie things I'm trying to work out >> with this, none of which I've managed to find in the Xcos tutorials, >> help docs, or the wiki. I went looking for a mailing list FAQ but I >> didn't see one. >> >> 1) The first one should be simple. How do I make signals default to >> horizontal instead of rat's-nest (point-to-point)? >> >> 2) Perhaps related to that, is it possible to manually drag signals >> to where I want them to be laid out? Some time back I used VisSim >> (for another example) - that also routed signals automatically, but >> it had a "wiring" block which let you direct them via a particular >> point. I can't find anything like that in Xcos. Of course I can use >> from/goto blocks where the automatic layout doesn't look good, or I >> could use unity gains or single-input sum blocks as a hack to force >> signals through some point without changing them, but none of that is >> really ideal. My rule of thumb is that if the design layout looks >> messy or rushed then the thought processes involved probably were >> too, and that makes me worried. >> >> 3) In Simulink, I can put labels on inputs and outputs. If I've got >> a subsystem calculating biquad filter coefficients, say, I can label >> the inputs "cornerFreq", "qFactor" and "sampleTime", and the outputs >> as "b0/b1/b2/a0/a1/a2". When I drop an instance of that subsystem >> into a diagram, those names will appear next to the inputs/outputs. >> That makes the design clearer, instead of having to dig into the >> subsystem and look for annotion text in there (or worse, figure it >> out directly from the design itself). Is there a way to make Xcos >> subsystems do this? >> >> 4) Simulink lets you put names on signal flows as they come out of an >> output. As the signal flow goes through the design, Simulink labels >> the signal. Typically you'd give this a variable name. Auto-coding >> can then use that variable name, or if you're coding up a design >> manually then you can use that name. I can see the "Kalman" demo >> doing something like this (or perhaps like point 2, I can't tell), >> but I can't find anywhere how those names for flows are set up. >> >> 5) Masks. If it's your own block, Simulink lets you look at the >> subsystem under the mask. Xcos lets you put a mask on a block, but I >> can't then see any way to look at the subsystem under the mask, >> except by completely deleting the mask. For us mere mortals whose >> designs don't always work first time every time, this could be a >> problem. >> >> Thanks folks. >> >> Graham. >> >> ------------------------------------------------------------------------- >> The information contained in this email may be privileged and is >> intended for the personal and confidential use of the recipient(s) >> named above. If the reader of this message is not the intended >> recipient or an agent responsible for delivering it to the intended >> recipient, you are hereby notified that you have received this email >> in error and that any review, dissemination or copying of this >> message is strictly prohibited. If you have received this email in >> error, please notify us immediately. >> This message and any attachments are believed to be free of any virus >> or defect that might affect any computer system into which it is >> received and opened. However, it is the responsibility of the >> recipient to ensure that it is virus free; therefore, no >> responsibility is accepted for any loss or damage in any way arising >> from its use. >> --------------------------------------------------------------------------- >> Elektron Technology plc >> Registered in England No.448274. >> Broers Building, 21 JJ Thomson Avenue, Cambridge, CB3 0FA >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > -- Pierre-Aim? Agnel R&D Projects Manager Phone: +33.1.80.77.04.67 Mobile: +33.6.82.49.35.23 ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.60 http://www.scilab-enterprises.com From Graham.Bartlett at elektron-technology.com Tue Apr 12 19:13:13 2016 From: Graham.Bartlett at elektron-technology.com (Graham B) Date: Tue, 12 Apr 2016 10:13:13 -0700 (MST) Subject: [Scilab-users] Xcos - names/labels for subsystems and ports? In-Reply-To: <570D08AB.7010403@scilab-enterprises.com> References: <886141A8F6CAB54583133B591DD9B35A2A658A0D@ELEKGROUP-MBS1.ElektronGroup.local> <570D08AB.7010403@scilab-enterprises.com> Message-ID: <1460481193444-4033974.post@n3.nabble.com> Thanks paul. Think we crossed posts on me finding the answers to 1) and 2) on my own. For 3), I guess I'll have a look into that. Probably more than I want to do in my current newbie state though. 4) OK, I've found that and added names to links. Those names only stay on the specific link you label though. If you label links going into a subsystem, they do not propagate when you drill down into the subsystem. So they're not really comparable to the Simulink version. Not a big deal, but something to keep in mind. 5) Let he who's never found a bug in production software cast the first why-would-we-want-to-look-under-the-mask stone. ;) Not a problem for us at the moment, but it would definitely be a showstopper if I was actively developing for Xcos. -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Xcos-names-labels-for-subsystems-and-ports-tp4033970p4033974.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Thu Apr 14 09:12:41 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 14 Apr 2016 09:12:41 +0200 Subject: [Scilab-users] uman 2.0 is released <= Re: uman : help in the console, with language switch, automatic redirections, related online pages. In-Reply-To: References: <5575F0C7.3080207@free.fr> <55769561.8050605@laas.fr> Message-ID: <570F42E9.8020606@free.fr> Hello, I am glad to announce the release of /uman 2.0/ on ATOMS, for Scilab 5 as well as for Scilab 6.0. uman 2.0 is available through the ATOMS manager. https://atoms.scilab.org/toolboxes/uman After installing uman 2.0, users formerly using a previous uman version must do the following before the very first use of 2.0: rmdir("SCIHOME\uman", "s") uman 2.0 is a major version: * Its search engine has been rewritten * It proposes many new features Check its release notes where features are briefly presented with illustrations and examples: https://atoms.scilab.org/toolboxes/uman/2.0.5/files/uman_2.0_Release_notes.pdf In addition to embedded pages, new uman online help pages are available there . Hoping that uman 2.0 will be useful to all Scilab users, developers, as well as translators or people using (fr, ja, pt, ru) or other languages than en_US english, Enjoy! Samuel Le 22/11/2015 22:47, Rafael Guerra a ?crit : > > Hello Samuel, > > Thanks for sharing *uman* and congratulations for the amazing work done. > > This is a very useful tool to increase Scilab users productivity. > > The quick access to the appropriate bug webpages is awesome. > > May we also use uman to query the relevant threads in Scilab users > webpages? > > Kind regards, > > Rafael > > *From:*users [mailto:users-bounces at lists.scilab.org] *On Behalf Of > *Antoine Monmayrant > *Sent:* Tuesday, June 09, 2015 8:27 AM > *To:* International users mailing list for Scilab. > > *Subject:* Re: [Scilab-users] uman : help in the console, with > language switch, automatic redirections, related online pages. > > I just started to play with it and it looks good! > It provides a feature that scilab is lacking: a decent command line > documentation. > Thanks, > > Antoine > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Thu Apr 14 23:31:47 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 14 Apr 2016 23:31:47 +0200 Subject: [Scilab-users] uman 2.0 is released <= Re: uman : help in the console, with language switch, automatic redirections, related online pages. In-Reply-To: <570F42E9.8020606@free.fr> References: <5575F0C7.3080207@free.fr> <55769561.8050605@laas.fr> <570F42E9.8020606@free.fr> Message-ID: Hi Samuel, Thanks for sharing the new uman version but could please advise about its installation on Scilab 5.5.2. Uman's "readme.txt" recommends using ATOMS but then, only the older 1.3 uman version seems to be available and to get installed. Kind regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Thursday, April 14, 2016 9:13 AM To: Users mailing list for Scilab Subject: [Scilab-users] uman 2.0 is released <= Re: uman : help in the console, with language switch, automatic redirections, related online pages. Hello, I am glad to announce the release of uman 2.0 on ATOMS, for Scilab 5 as well as for Scilab 6.0. uman 2.0 is available through the ATOMS manager. https://atoms.scilab.org/toolboxes/uman After installing uman 2.0, users formerly using a previous uman version must do the following before the very first use of 2.0: rmdir("SCIHOME\uman", "s") uman 2.0 is a major version: * Its search engine has been rewritten * It proposes many new features Check its release notes where features are briefly presented with illustrations and examples: https://atoms.scilab.org/toolboxes/uman/2.0.5/files/uman_2.0_Release_notes.pdf In addition to embedded pages, new uman online help pages are available there . Hoping that uman 2.0 will be useful to all Scilab users, developers, as well as translators or people using (fr, ja, pt, ru) or other languages than en_US english, Enjoy! Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Apr 15 00:49:08 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 15 Apr 2016 00:49:08 +0200 Subject: [Scilab-users] uman 2.0 is released <= Re: uman : help in the console, with language switch, automatic redirections, related online pages. In-Reply-To: References: <5575F0C7.3080207@free.fr> <55769561.8050605@laas.fr> <570F42E9.8020606@free.fr> Message-ID: <57101E64.5090404@free.fr> Hi Rafael, Le 14/04/2016 23:31, Rafael Guerra a ?crit : > > Hi Samuel, > > Thanks for sharing the new uman version but could please advise about > its installation on Scilab 5.5.2. > > Uman?s?readme.txt? recommends using ATOMS but then, only the older 1.3 > uman version seems to be available and to get installed. > . In the ATOMS GUI, you shall priorly run the menu /File => Update the list of packages/. Running atomsSystemUpdate() in the console does the same. Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Fri Apr 15 01:13:46 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 15 Apr 2016 01:13:46 +0200 Subject: [Scilab-users] uman 2.0 is released <= Re: uman : help in the console, with language switch, automatic redirections, related online pages. In-Reply-To: <57101E64.5090404@free.fr> References: <5575F0C7.3080207@free.fr> <55769561.8050605@laas.fr> <570F42E9.8020606@free.fr> <57101E64.5090404@free.fr> Message-ID: Samuel, Thanks a lot for the tips. Running atomsSystemUpdate() has solved my problem. PS: File => Update the list of packages did not work, issuing the following error: !--error 10000 %st_e: Wrong value for input argument #1: not a valid field name. at line 39 of function %st_e called by : at line 118 of function atomsGetLeftListboxElts called by : at line 26 of function cbAtomsGui called by : hen %oldgcbo = gcbo; end;gcbo = getcallbackobject(99);cbAtomsGui;if exists("%oldgcbo") then gcbo = %oldgcbo; while executing a callback Kind regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Friday, April 15, 2016 12:49 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] uman 2.0 is released <= Re: uman : help in the console, with language switch, automatic redirections, related online pages. Hi Rafael, Le 14/04/2016 23:31, Rafael Guerra a ?crit : Hi Samuel, Thanks for sharing the new uman version but could please advise about its installation on Scilab 5.5.2. Uman?s ?readme.txt? recommends using ATOMS but then, only the older 1.3 uman version seems to be available and to get installed. . In the ATOMS GUI, you shall priorly run the menu File => Update the list of packages. Running atomsSystemUpdate() in the console does the same. Best regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleksiy.bond at gmail.com Mon Apr 18 08:03:09 2016 From: oleksiy.bond at gmail.com (ol.bond) Date: Sun, 17 Apr 2016 23:03:09 -0700 (MST) Subject: [Scilab-users] Function int() strange behavior Message-ID: Hello, I have found some weird behavior of int() function in SciLab 5.5.2: -->1.45/0.025 ans = 58. -->round(1.45/0.025) ans = 58. *but:* int(1.45/0.025) ans = 57. Can anyone explain what is going on? -- View this message in context: http://mailinglists.scilab.org/Function-int-strange-behavior-tp4033993.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 Mon Apr 18 08:12:31 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 18 Apr 2016 08:12:31 +0200 Subject: [Scilab-users] Function int() strange behavior In-Reply-To: References: Message-ID: <57147ACF.1090608@free.fr> Hello, Le 18/04/2016 08:03, ol.bond a ?crit : > .../... > > *but:* > > int(1.45/0.025) > ans = > 57. > > Can anyone explain what is going on? . --> 1.45/0.025 - 58 ans = -7.105D-15 is the round-off error SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleksiy.bond at gmail.com Mon Apr 18 08:17:11 2016 From: oleksiy.bond at gmail.com (ol.bond) Date: Sun, 17 Apr 2016 23:17:11 -0700 (MST) Subject: [Scilab-users] Function int() strange behavior In-Reply-To: <57147ACF.1090608@free.fr> References: <57147ACF.1090608@free.fr> Message-ID: Thank you Samuel, I got it also.... 2016-04-18 15:13 GMT+09:00 Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives] : > Hello, > > Le 18/04/2016 08:03, ol.bond a ?crit : > > .../... > > *but:* > > int(1.45/0.025) > ans = > > 57. > > Can anyone explain what is going on? > > . > --> 1.45/0.025 - 58 > ans = > > -7.105D-15 > > is the round-off error > SG > > > _______________________________________________ > 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/Function-int-strange-behavior-tp4033993p4033994.html > To start a new topic under Scilab users - Mailing Lists Archives, email > ml-node+s994242n2602246h53 at n3.nabble.com > To unsubscribe from Scilab users - Mailing Lists Archives, click here > > . > NAML > > -- View this message in context: http://mailinglists.scilab.org/Function-int-strange-behavior-tp4033993p4033995.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 Mon Apr 18 08:57:38 2016 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 18 Apr 2016 08:57:38 +0200 Subject: [Scilab-users] Function int() strange behavior In-Reply-To: References: <57147ACF.1090608@free.fr> Message-ID: <57148562.7060006@utc.fr> It seems to be the normal behavior, as int() and floor() behave the same for positive numbers (and 1.45 cannot be stored exactly with IEEE 754) S. Le 18/04/2016 08:17, ol.bond a ?crit : > Thank you Samuel, I got it also.... > > 2016-04-18 15:13 GMT+09:00 Samuel GOUGEON [via Scilab / Xcos - Mailing > Lists Archives] <[hidden email] > >: > > Hello, > > Le 18/04/2016 08:03, ol.bond a ?crit : >> .../... >> >> *but:* >> >> int(1.45/0.025) >> ans = >> 57. >> >> Can anyone explain what is going on? > . > --> 1.45/0.025 - 58 > ans = > > -7.105D-15 > > is the round-off error > SG > > > _______________________________________________ > 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/Function-int-strange-behavior-tp4033993p4033994.html > > To start a new topic under Scilab users - Mailing Lists Archives, > email [hidden email] > To unsubscribe from Scilab users - Mailing Lists Archives, click here. > NAML > > > > > > ------------------------------------------------------------------------ > View this message in context: Re: Function int() strange behavior > > 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 -- D?partement de G?nie Informatique EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable Universit? de Technologie de Compi?gne - CS 60319 60203 Compi?gne cedex -------------- next part -------------- An HTML attachment was scrubbed... URL: From j-lan at online.no Mon Apr 18 12:14:40 2016 From: j-lan at online.no (JLan) Date: Mon, 18 Apr 2016 03:14:40 -0700 (MST) Subject: [Scilab-users] Executing scripts with functions from GUI Message-ID: <1460974480437-4033997.post@n3.nabble.com> I wonder if someone can give me a hint here. I am trying to make a menu GUI that can start different scripts. This does not work properly when the scripts contain functions. A simple example. I have a script called aaa.sce : //------------------- disp('Script aaa') function afun(aa) if aa=='-a' then disp('AFUN') end endfunction //------------------- After executing this from the console: *-->exec('aaa.sce', -1)* I can obviously do: * 1 Script aaa -->afun -a AFUN * I then clear afun and try to start this from my GUI maingui.sce: //---------------------------------------------------------- clear afun function sel(al) disp(al); if al==1 then exec('aaa.sce',-1) end if al==2 then exec('bbb.sce',-1) end if al==3 then disp('D_Spare') end set(hl, 'value', []); endfunction ctrw=figure(... 'figure_position',[-1,-1],... 'figure_size', [620,400],... 'figure_name', '',... 'menubar_visible','off',... 'toolbar_visible','off'); ht1=uicontrol(ctrw,... 'style','text',... 'position', [10 310 100 30],... 'string',' MAIN MENU'); hl=uicontrol(ctrw,'style','listbox', ... 'position', [10 10 550 280],... 'callback','sel(get(hl,''value''))'); set(hl, 'string',"... Run aaa|... Run bbb|... spare"); //----------------------------------------- When running *-->exec('maingui.sce', -1)* then clicking aaa and trying to run afun I get: * 1. Script aaa -->afun -a !--error 4 Undefined variable: afun* I have tried to define afun as global, it has an effect but I still don't get the same response. Jan ? -- View this message in context: http://mailinglists.scilab.org/Executing-scripts-with-functions-from-GUI-tp4033997.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From yann.debray at scilab-enterprises.com Mon Apr 18 20:08:31 2016 From: yann.debray at scilab-enterprises.com (Yann DEBRAY) Date: Mon, 18 Apr 2016 20:08:31 +0200 Subject: [Scilab-users] Help us define what Scilab can do in control system In-Reply-To: <206de3d67a240699d79ff819e41b7d5f@scilab-enterprises.com> References: <206de3d67a240699d79ff819e41b7d5f@scilab-enterprises.com> Message-ID: <5715229F.50902@scilab-enterprises.com> Hello Scilab user, We would like to develop Scilab further in specific fields such as *Control System* and that starts by making Scilab features clearer. For now the Scilab online help is quite hard to operate. So, we are beginning to organize it starting with the control system (CACSD ) features. Here is a first shot: *LTI model generation and manipulation* # Discrete and continuous time # State-space and transfer function representations *Analyzing model* # Evans for root locus # Steady state error # Bode, Nyquist and Black # Time, frequency response *Designing and tuning control systems* #PID, LQG tuning It is incomplete and obviously superficial. That is why we need a competent opinion. --> Please give us feedback about how you would like it to be organized ;) Yann Debray For the Scilab Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Apr 18 21:05:17 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 18 Apr 2016 21:05:17 +0200 Subject: [Scilab-users] Executing scripts with functions from GUI In-Reply-To: <1460974480437-4033997.post@n3.nabble.com> References: <1460974480437-4033997.post@n3.nabble.com> Message-ID: <57152FED.4040804@free.fr> Le 18/04/2016 12:14, JLan a ?crit : > I wonder if someone can give me a hint here. > > I am trying to make a menu GUI that can start different scripts. > > This does not work properly when the scripts contain functions. > > A simple example. I have a script called > aaa.sce : > //------------------- > disp('Script aaa') > function afun(aa) > if aa=='-a' then > disp('AFUN') > end > endfunction > //------------------- > After executing this from the console: > *-->exec('aaa.sce', -1)* > I can obviously do: > * > 1 > > Script aaa > > -->afun -a > > AFUN > * > I then clear afun and try to start this from my GUI > maingui.sce: > //---------------------------------------------------------- > clear afun > function sel(al) > disp(al); > if al==1 then > > exec('aaa.sce',-1) > end > if al==2 then > exec('bbb.sce',-1) > end > if al==3 then > disp('D_Spare') > end > set(hl, 'value', []); > endfunction > > ctrw=figure(... > 'figure_position',[-1,-1],... > 'figure_size', [620,400],... > 'figure_name', '',... > 'menubar_visible','off',... > 'toolbar_visible','off'); > ht1=uicontrol(ctrw,... > 'style','text',... > 'position', [10 310 100 30],... > 'string',' MAIN MENU'); > hl=uicontrol(ctrw,'style','listbox', ... > 'position', [10 10 550 280],... > 'callback','sel(get(hl,''value''))'); > > set(hl, 'string',"... > Run aaa|... > Run bbb|... > spare"); > //----------------------------------------- > > When running > *-->exec('maingui.sce', -1)* > then clicking aaa and trying to run afun I get: > * > > 1. > > Script aaa > > -->afun -a > !--error 4 > Undefined variable: afun* > > I have tried to define afun as global, it has an effect but I still don't > get the same response. afun() is defined in sel(), and so is local to sel(). It is cleared when leaving sel(). To prevent this, you may return it as "afun" in the environment calling sel() with: afun = return(afun) at the end of sel(), before leaving it. https://help.scilab.org/docs/5.5.2/en_US/return.html HTH Samuel From sgougeon at free.fr Mon Apr 18 21:23:13 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 18 Apr 2016 21:23:13 +0200 Subject: [Scilab-users] Help us define what Scilab can do in control system In-Reply-To: <5715229F.50902@scilab-enterprises.com> References: <206de3d67a240699d79ff819e41b7d5f@scilab-enterprises.com> <5715229F.50902@scilab-enterprises.com> Message-ID: <57153421.7080904@free.fr> Hello Yann, Why not starting from Serge Steer's proposal and discussing it: http://bugzilla.scilab.org/14239 Actual proposal: http://bugzilla.scilab.org/attachment.cgi?id=4184 In a general case, the only thing i would say about it (as about any other one), is that no subsection should have less that 4-5 entries. For proposed sub(-sub)sections with less than 4 entries, these ones should be transfered at the root of the parent section. E.g.: Control Design /Linear quadratic gcare ... ~10 entries : OK /Pole placement kpure krac2 ppol stabil /Tracking gfrancis NOK /Disturbance decoupling ddp NOK /H-infinity ccontrg dhinf dhnorm ... > 5 entries : OK *should rather be* Control Design /Linear quadratic gcare ... ~10 entries : OK /Pole placement kpure krac2 ppol stabil /H-infinity ccontrg dhinf dhnorm ... > 5 entries : OK gfrancis ddp For my part, i hate loosing my time in exploring deep levels having almost nothing. From having for years not a single subsection with 140 functions on the same common box, to having too many subsections poorly populated, i think there is a wise middle way. If further functions are implemented and may feed a new common subsection, then it will never be too late to create it later when really needed and meaningful. Best regards Samuel Le 18/04/2016 20:08, Yann DEBRAY a ?crit : > Hello Scilab user, > > We would like to develop Scilab further in specific fields such as > *Control System* and that starts by making Scilab features clearer. > For now the Scilab online help > > is quite hard to operate. So, we are beginning to organize it starting > with the control system (CACSD > ) > features. Here is a first shot: > > *LTI model generation and manipulation* > # Discrete and continuous time > # State-space and transfer function representations > *Analyzing model* > # Evans for root locus > # Steady state error > # Bode, Nyquist and Black > # Time, frequency response > *Designing and tuning control systems* > #PID, LQG tuning > > It is incomplete and obviously superficial. That is why we need a > competent opinion. > --> Please give us feedback about how you would like it to be organized ;) > > Yann Debray > For the Scilab Team > > > > > _______________________________________________ > 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-lan at online.no Mon Apr 18 23:20:17 2016 From: j-lan at online.no (=?UTF-8?Q?Jan_=c3=85ge_Langeland?=) Date: Mon, 18 Apr 2016 23:20:17 +0200 Subject: [Scilab-users] Executing scripts with functions from GUI In-Reply-To: <57152FED.4040804@free.fr> References: <1460974480437-4033997.post@n3.nabble.com> <57152FED.4040804@free.fr> Message-ID: <57154F91.7040606@online.no> On 18.04.2016 21:05, Samuel Gougeon wrote: > afun() is defined in sel(), and so is local to sel(). It is cleared > when leaving sel(). To prevent this, you may return it as "afun" in > the environment calling sel() with: > afun = return(afun) > at the end of sel(), before leaving it. > > https://help.scilab.org/docs/5.5.2/en_US/return.html > > HTH > Samuel Thanks a lot, works fine, although it is a bit sensitive to changes in the executed scripts. Brgds Jan ? From vittorio.comino at gmail.com Fri Apr 22 23:16:52 2016 From: vittorio.comino at gmail.com (Vittorio Comino) Date: Fri, 22 Apr 2016 16:16:52 -0500 Subject: [Scilab-users] Do I have the C compiler? In-Reply-To: <56E47A85.4050505@free.fr> References: <56E47A85.4050505@free.fr> Message-ID: Mr. Gougeon, I am still without a compiler. Do you have any suggestions on what to do, on where to look, on whom to contact? Does the Scilab organization work on this problem? Will Scilab 6 fix it? I understand you have work to do and I do not wish to impose myself. So do not feel you have to answer this message. Thanks and Best Regards, Vittorio Comino 2016-03-12 14:22 GMT-06:00 Samuel Gougeon : > Le 12/03/2016 21:08, Vittorio Comino a ?crit : > > .../... > > Can anybody please help me to get a C compiler working in Scilab? > > . > You may add a comment here: Add a way to declare explicitly the path to a > C compiler > > SG > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From smsubham342 at gmail.com Fri Apr 22 23:49:39 2016 From: smsubham342 at gmail.com (Subham Mishra) Date: Sat, 23 Apr 2016 03:19:39 +0530 Subject: [Scilab-users] Do I have the C compiler? In-Reply-To: References: <56E47A85.4050505@free.fr> Message-ID: Please unsubscribe me. On 4/23/16, Vittorio Comino wrote: > Mr. Gougeon, > > I am still without a compiler. > Do you have any suggestions on what to do, on where to look, on whom to > contact? > Does the Scilab organization work on this problem? > Will Scilab 6 fix it? > I understand you have work to do and I do not wish to impose myself. So do > not feel you have to answer this message. > Thanks and Best Regards, > > Vittorio Comino > > 2016-03-12 14:22 GMT-06:00 Samuel Gougeon : > >> Le 12/03/2016 21:08, Vittorio Comino a ?crit : >> >> .../... >> >> Can anybody please help me to get a C compiler working in Scilab? >> >> . >> You may add a comment here: Add a way to declare explicitly the path to a >> C compiler >> >> SG >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> >> > From kopac.jakub at gmail.com Mon Apr 25 21:13:00 2016 From: kopac.jakub at gmail.com (kjubo) Date: Mon, 25 Apr 2016 12:13:00 -0700 (MST) Subject: [Scilab-users] Restoration error (5.2.2-64bit) Message-ID: <1461611580768-4034016.post@n3.nabble.com> Dear all, I encourted a weird problem. After starting to use external monitor with my notebook, Scilab stopped to work. I get error messages I had tried reinstall SciLab, but this does not helps. Do you have any idea what can I do, to start using Scilab again? Thanks in advance Jakub Kop?? NOTE: I am using Scilab 5.2.2-x64 on Win7PRO-64bit, without XCOS installed and only reference math libraries. -- View this message in context: http://mailinglists.scilab.org/Restoration-error-5-2-2-64bit-tp4034016.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From j-lan at online.no Mon Apr 25 21:34:08 2016 From: j-lan at online.no (=?UTF-8?Q?Jan_=c3=85ge_Langeland?=) Date: Mon, 25 Apr 2016 21:34:08 +0200 Subject: [Scilab-users] Restoration error (5.2.2-64bit) In-Reply-To: <1461611580768-4034016.post@n3.nabble.com> References: <1461611580768-4034016.post@n3.nabble.com> Message-ID: <571E7130.5060602@online.no> Have you tried to delete your configuration files? Could be here: C:\Users\NN\AppData\Roaming\Scilab Jan ? On 25.04.2016 21:13, kjubo wrote: > Dear all, > > I encourted a weird problem. After starting to use external monitor with my > notebook, Scilab stopped to work. > I get error messages > > > I had tried reinstall SciLab, but this does not helps. > > Do you have any idea what can I do, to start using Scilab again? > > Thanks in advance > > Jakub Kop?? > > NOTE: I am using Scilab 5.2.2-x64 on Win7PRO-64bit, without XCOS installed > and only reference math libraries. > > > > -- > View this message in context: http://mailinglists.scilab.org/Restoration-error-5-2-2-64bit-tp4034016.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 Apr 25 23:45:25 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 25 Apr 2016 23:45:25 +0200 Subject: [Scilab-users] users mailing lists out of english and french-speaking ones Message-ID: <571E8FF5.2030303@free.fr> Hi, Is there anywhere public active Scilab users mailing lists in Brasilian, in Japanese, in Russian, in Spanish, or in German? Thanks Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Tue Apr 26 00:45:23 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Mon, 25 Apr 2016 15:45:23 -0700 Subject: [Scilab-users] users mailing lists out of english and french-speaking ones In-Reply-To: <571E8FF5.2030303@free.fr> References: <571E8FF5.2030303@free.fr> Message-ID: <1461624323.4314.40.camel@Servo> I suspect that even a Brazilian would concede that the native language there is Portuguese, perhaps with an accent. On Mon, 2016-04-25 at 23:45 +0200, Samuel Gougeon wrote: > Hi, > Is there anywhere public active Scilab users mailing lists in > Brasilian, in Japanese, in Russian, in Spanish, or in German? > Thanks > Samuel Gougeon > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From kopac.jakub at gmail.com Tue Apr 26 07:14:26 2016 From: kopac.jakub at gmail.com (kjubo) Date: Mon, 25 Apr 2016 22:14:26 -0700 (MST) Subject: [Scilab-users] Restoration error (5.2.2-64bit) In-Reply-To: <571E7130.5060602@online.no> References: <1461611580768-4034016.post@n3.nabble.com> <571E7130.5060602@online.no> Message-ID: Dear Jan, thanks, this helps an Scilab now works. As Scilab is portable (or at least does not need administrator privileges) I supposed, that all data are stored in AppData. But not (even when I search for scilab string in whole C:/, windows did not found this directory). Thanks for your help. Best regards Jakub Kop?? 2016-04-25 21:35 GMT+02:00 JLan [via Scilab / Xcos - Mailing Lists Archives] : > Have you tried to delete your configuration files? Could be here: > C:\Users\NN\AppData\Roaming\Scilab > Jan ? > > On 25.04.2016 21:13, kjubo wrote: > > > Dear all, > > > > I encourted a weird problem. After starting to use external monitor with > my > > notebook, Scilab stopped to work. > > I get error messages > > > > > > I had tried reinstall SciLab, but this does not helps. > > > > Do you have any idea what can I do, to start using Scilab again? > > > > Thanks in advance > > > > Jakub Kop?? > > > > NOTE: I am using Scilab 5.2.2-x64 on Win7PRO-64bit, without XCOS > installed > > and only reference math libraries. > > > > > > > > -- > > View this message in context: > http://mailinglists.scilab.org/Restoration-error-5-2-2-64bit-tp4034016.html > > 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 > > _______________________________________________ > 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/Restoration-error-5-2-2-64bit-tp4034016p4034017.html > To start a new topic under Scilab users - Mailing Lists Archives, email > ml-node+s994242n2602246h22 at n3.nabble.com > To unsubscribe from Restoration error (5.2.2-64bit), click here > > . > NAML > > -- View this message in context: http://mailinglists.scilab.org/Restoration-error-5-2-2-64bit-tp4034016p4034021.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Apr 26 11:56:17 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 26 Apr 2016 11:56:17 +0200 Subject: [Scilab-users] users mailing lists out of english and french-speaking ones In-Reply-To: <1461624323.4314.40.camel@Servo> References: <571E8FF5.2030303@free.fr> <1461624323.4314.40.camel@Servo> Message-ID: +1 :) -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Tim Wescott Sent: Tuesday, April 26, 2016 12:45 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] users mailing lists out of english and french-speaking ones I suspect that even a Brazilian would concede that the native language there is Portuguese, perhaps with an accent. On Mon, 2016-04-25 at 23:45 +0200, Samuel Gougeon wrote: > Hi, > Is there anywhere public active Scilab users mailing lists in > Brasilian, in Japanese, in Russian, in Spanish, or in German? > Thanks > Samuel Gougeon > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From shamika.i.nair at gmail.com Thu Apr 28 08:19:26 2016 From: shamika.i.nair at gmail.com (Shamika Mohanan) Date: Thu, 28 Apr 2016 11:49:26 +0530 Subject: [Scilab-users] Set axes limit for plot Message-ID: How do I set the minimum and maximum values for the axes in a plot? When I use the plot command as plot(x1,y1,x2,y2) I get the plot where x axis is from 0 to 100 and y axis is from -20 to 120. How do I set the axis from 25 to 100 for both x and y axes? Shamika -------------- next part -------------- An HTML attachment was scrubbed... URL: From Serge.Steer at inria.fr Thu Apr 28 09:35:41 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 28 Apr 2016 09:35:41 +0200 Subject: [Scilab-users] Set axes limit for plot In-Reply-To: References: Message-ID: <5721BD4D.70706@inria.fr> Le 28/04/2016 08:19, Shamika Mohanan a ?crit : > How do I set the minimum and maximum values for the axes in a plot? > > When I use the plot command as > > plot(x1,y1,x2,y2) > > I get the plot where x axis is from 0 to 100 and y axis is from -20 to > 120. How do I set the axis from 25 to 100 for both x and y axes? > > Shamika > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users after the plot you can do ax=gca(),// gat the handle on the current axes ax.data_bounds=[25 25;100 100]; Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Thu Apr 28 09:15:30 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 28 Apr 2016 07:15:30 +0000 Subject: [Scilab-users] {EXT} Set axes limit for plot In-Reply-To: References: Message-ID: I forgot: you should also add : h.tight_limits=["on","on"]; 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 Christophe.Dang at sidel.com Thu Apr 28 09:12:18 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 28 Apr 2016 07:12:18 +0000 Subject: [Scilab-users] {EXT} Set axes limit for plot In-Reply-To: References: Message-ID: Hello, > De : Shamika Mohanan > Envoy? : jeudi 28 avril 2016 08:19 > > How do I set the minimum and maximum values for the axes in a plot? > When I use the plot command as > plot(x1,y1,x2,y2) > [...] How do I set the axis from 25 to 100 for both x and y axes? You should try : plot(x1,y1,x2,y2) h = gca(); // get current axes h.data_bounds = [25, 25 ; 100, 100]; See : https://help.scilab.org/docs/5.5.2/en_US/axes_properties.html 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 antoine.monmayrant at laas.fr Thu Apr 28 10:59:23 2016 From: antoine.monmayrant at laas.fr (antoine.monmayrant at laas.fr) Date: Thu, 28 Apr 2016 10:59:23 +0200 Subject: [Scilab-users] scilab 6.0 beta, command line history and freezes Message-ID: <5721D0EB.5020308@laas.fr> Hi everyone, I think I found a bug (regression) in the current beta and I wonder whether it is related to my own setup (os, config, ...) or whether it's more general. Is anyone here routinely using the current beta in command line mode (ie "scilab -nw" or "scilab-cli") ? If yes, did you observe anything weird when navigating the command history using the up and down arrows? For me, it freezes scilab for several minutes and does not echo the previous commands properly (observed on several linux 64bits computers), see http://bugzilla.scilab.org/show_bug.cgi?id=14535 . Is anyone experiencing the same issue? As anyone any clue on how to avoid it for the time being (apart from ripping off the up/dow arrows from my keyboard)? Cheers, Antoine From Serge.Steer at inria.fr Thu Apr 28 11:59:29 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 28 Apr 2016 11:59:29 +0200 Subject: [Scilab-users] scilab 6.0 beta, command line history and freezes In-Reply-To: <5721D0EB.5020308@laas.fr> References: <5721D0EB.5020308@laas.fr> Message-ID: <5721DF01.50804@inria.fr> Hello, I just tried under Suse 13.2 and it seems to work as expected. Serge Le 28/04/2016 10:59, antoine.monmayrant at laas.fr a ?crit : > Hi everyone, > > I think I found a bug (regression) in the current beta and I wonder > whether it is related to my own setup (os, config, ...) or whether > it's more general. > Is anyone here routinely using the current beta in command line mode > (ie "scilab -nw" or "scilab-cli") ? > If yes, did you observe anything weird when navigating the command > history using the up and down arrows? > For me, it freezes scilab for several minutes and does not echo the > previous commands properly (observed on several linux 64bits > computers), see http://bugzilla.scilab.org/show_bug.cgi?id=14535 . > > Is anyone experiencing the same issue? > As anyone any clue on how to avoid it for the time being (apart from > ripping off the up/dow arrows from my keyboard)? > > Cheers, > > Antoine > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From pierre-aime.agnel at scilab-enterprises.com Thu Apr 28 18:47:58 2016 From: pierre-aime.agnel at scilab-enterprises.com (=?UTF-8?Q?Pierre-Aim=c3=a9_Agnel?=) Date: Thu, 28 Apr 2016 18:47:58 +0200 Subject: [Scilab-users] scilab 6.0 beta, command line history and freezes In-Reply-To: <5721D0EB.5020308@laas.fr> References: <5721D0EB.5020308@laas.fr> Message-ID: <57223EBE.70702@scilab-enterprises.com> Hi everyone, This might be a problem with the libncurses that are packaged (that handles terminal display). There is a workaround for fixing it, you can force scilab to use your system libs with (for example) LD_PRELOAD="/lib/x86_64-linux-gnu/libncurses.so.5" bin/scilab -nw See if this workaround solves that problem: => if it solves it, I'll mark it as a duplicate of bug 14404 => if not you may update the bug with the result of [the following might be interesting if you have a scilab stuck for linux users and bug reporting] | gdb --pid=$(pidof scilab-bin scilab-cli-bin lt-scilab-bin lt-scilab-cli-bin) --eval-command='thread apply all bt'| This will attach gdb to your stuck scilab, you can then post the back trace and we can analyze where the problem is. Thank you for reporting, hope this helps, Pierre-Aim? Le 28/04/2016 10:59, antoine.monmayrant at laas.fr a ?crit : > Hi everyone, > > I think I found a bug (regression) in the current beta and I wonder > whether it is related to my own setup (os, config, ...) or whether > it's more general. > Is anyone here routinely using the current beta in command line mode > (ie "scilab -nw" or "scilab-cli") ? > If yes, did you observe anything weird when navigating the command > history using the up and down arrows? > For me, it freezes scilab for several minutes and does not echo the > previous commands properly (observed on several linux 64bits > computers), see http://bugzilla.scilab.org/show_bug.cgi?id=14535 . > > Is anyone experiencing the same issue? > As anyone any clue on how to avoid it for the time being (apart from > ripping off the up/dow arrows from my keyboard)? > > Cheers, > > Antoine > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Fri Apr 29 08:35:01 2016 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Fri, 29 Apr 2016 08:35:01 +0200 Subject: [Scilab-users] scilab 6.0 beta, command line history and freezes In-Reply-To: <57223EBE.70702@scilab-enterprises.com> References: <5721D0EB.5020308@laas.fr> <57223EBE.70702@scilab-enterprises.com> Message-ID: <57230095.6000804@laas.fr> Le 04/28/2016 06:47 PM, Pierre-Aim? Agnel a ?crit : > LD_PRELOAD="/lib/x86_64-linux-gnu/libncurses.so.5" bin/scilab -nw That solved the problem! Thanks a lot. I'll update the bug report. Cheers, Antoine From antoine.monmayrant at laas.fr Fri Apr 29 08:43:09 2016 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Fri, 29 Apr 2016 08:43:09 +0200 Subject: [Scilab-users] scilab 6.0 beta, command line history and freezes In-Reply-To: <57223EBE.70702@scilab-enterprises.com> References: <5721D0EB.5020308@laas.fr> <57223EBE.70702@scilab-enterprises.com> Message-ID: <5723027D.6030405@laas.fr> The command below requires a sudo on my system: > |sudo gdb --pid=$(pidof scilab-bin scilab-cli-bin lt-scilab-bin > lt-scilab-cli-bin) --eval-command='thread apply all bt'| > > This will attach gdb to your stuck scilab, you can then post the back > trace and we can analyze where the problem is. Er, OK, but what are you talking about? gdb --please-be-nice-give-me-something-called-a-backtrace? Antoine (never used gdb) -------------- next part -------------- An HTML attachment was scrubbed... URL: From umut.durak at tu-clausthal.de Fri Apr 29 08:34:36 2016 From: umut.durak at tu-clausthal.de (Dr.Umut Durak) Date: Fri, 29 Apr 2016 08:34:36 +0200 Subject: [Scilab-users] Hiding the long function scifunc_block Message-ID: Folks, I have a long function expression in one of my scifunc_block. The block as default annotates the block with the exptession, which is quite good when the function is not that long. But this case it is a long one and I would like to hide the expression in the model but failed to find such a block setting. Any ideas? Umut From j.s.strom at hslmg.de Fri Apr 29 13:00:01 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Fri, 29 Apr 2016 13:00:01 +0200 Subject: [Scilab-users] Circular contour plot Message-ID: <57233EB1.7060509@hslmg.de> Hallo Scilab afficionados, I would like to cut off all lines of a 2D contour plot which are outside of a circle. I tried to set all external x and y to %nan. This works however partially spoils the plot /inside/ the circle too. Polar organisation of the x-y-points doesn't help either because x and y have to be monotone. Could anyone give me a hint how to proceed here? Kind Regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From pierre-aime.agnel at scilab-enterprises.com Fri Apr 29 14:13:12 2016 From: pierre-aime.agnel at scilab-enterprises.com (=?UTF-8?Q?Pierre-Aim=c3=a9_Agnel?=) Date: Fri, 29 Apr 2016 14:13:12 +0200 Subject: [Scilab-users] scilab 6.0 beta, command line history and freezes In-Reply-To: <5723027D.6030405@laas.fr> References: <5721D0EB.5020308@laas.fr> <57223EBE.70702@scilab-enterprises.com> <5723027D.6030405@laas.fr> Message-ID: <57234FD8.6030608@scilab-enterprises.com> Hi, Basically, Yes :) The problem with such bug is that it is quite difficult to analyze properly without a backtrace, and it didn't happen with most system configurations (besides it "froze" scilab leaving you no choice but to kill it without having the material to report) Thanks a bunch for the update. Le 29/04/2016 08:43, Antoine Monmayrant a ?crit : > The command below requires a sudo on my system: >> |sudo gdb --pid=$(pidof scilab-bin scilab-cli-bin lt-scilab-bin >> lt-scilab-cli-bin) --eval-command='thread apply all bt'| >> >> This will attach gdb to your stuck scilab, you can then post the back >> trace and we can analyze where the problem is. > > Er, OK, but what are you talking about? > > gdb --please-be-nice-give-me-something-called-a-backtrace? > > Antoine > (never used gdb) > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Pierre-Aim? Agnel R&D Projects Manager Phone: +33.1.80.77.04.67 Mobile: +33.6.82.49.35.23 ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.60 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Fri Apr 29 14:24:24 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 29 Apr 2016 14:24:24 +0200 Subject: [Scilab-users] Circular contour plot In-Reply-To: <57233EB1.7060509@hslmg.de> References: <57233EB1.7060509@hslmg.de> Message-ID: Hello, Is the following example ok? t=-%pi:0.02:%pi; M=sin(t)'*cos(t); n=length(t); r=2; //radius for i=1:n for j=1:n if sqrt(t(i)^2+t(j)^2)>r then M(i,j)=%nan; end end end clf(); Sgrayplot(t,t,M); Otherwise, could you provide a sample of your pb script. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Jens Simon Strom Sent: Friday, April 29, 2016 1:00 PM To: International users mailing list for Scilab. Subject: [Scilab-users] Circular contour plot Hallo Scilab afficionados, I would like to cut off all lines of a 2D contour plot which are outside of a circle. I tried to set all external x and y to %nan. This works however partially spoils the plot inside the circle too. Polar organisation of the x-y-points doesn't help either because x and y have to be monotone. Could anyone give me a hint how to proceed here? Kind Regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Fri Apr 29 15:35:33 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Fri, 29 Apr 2016 15:35:33 +0200 Subject: [Scilab-users] Circular contour plot In-Reply-To: References: <57233EB1.7060509@hslmg.de> Message-ID: <57236325.609@hslmg.de> Hallo Rafael, your script is perfect, mine isn't. Where is the bug? Regards, Jens clc(), clear(), mode(0),lines(0) R=1.; //Radius Erde a=50;//Abstand Mond - Erde g0=1; //Schwerebeschleunigung des Mondes im Zentrum der Erde VLev=[-0.02:0.002:0.02]; //Werte der ?quipotenziallinien-Kandidaten n=400;//Anzahl der x- und y-Werte xdel(); cmap=zeros(100,3); //Colormap f = scf(); f.color_map = cmap; x=linspace(a-R,a+R,n); y=linspace(-R,R,n); //Erdgebiet [X,Y]=ndgrid(x,y); pos=find((X-a).^2+Y.^2 > R^2); X(pos)=%nan; Y(pos)=%nan; V=-g0*(X+a^2../sqrt(X.^2+Y.^2)-2*a); philev=contour2d(x,y,V, VLev)//Plot und dargestellte ?quipotenziallinien ca=gca(); ca.isoview="on"; xset("fpf"," ") //Keine Levelanzeige, Reaktion erst nach dem 2. Lauf ----------------------------------------------------------------------------------------------------------------------------- Am 29.04.2016 14:24, schrieb Rafael Guerra: > > Hello, > > Is the following example ok? > > t=-%pi:0.02:%pi; > > M=sin(t)'*cos(t); > > n=length(t); > > r=2;///radius/ > > fori=1:n > > forj=1:n > > ifsqrt(t(i)^2+t(j)^2)>rthenM(i,j)=%nan;end > > end > > end > > _clf_(); > > _Sgrayplot_(t,t,M); > > Otherwise, could you provide a sample of your pb script. > > Regards, > > Rafael > > *From:*users [mailto:users-bounces at lists.scilab.org] *On Behalf Of > *Jens Simon Strom > *Sent:* Friday, April 29, 2016 1:00 PM > *To:* International users mailing list for Scilab. > > *Subject:* [Scilab-users] Circular contour plot > > Hallo Scilab afficionados, > I would like to cut off all lines of a 2D contour plot which are > outside of a circle. I tried to set all external x and y to %nan. > This works however partially spoils the plot /inside/ the circle too. > Polar organisation of the x-y-points doesn't help either because x and > y have to be monotone. Could anyone give me a hint how to proceed here? > Kind Regards > Jens > > > > _______________________________________________ > 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 Sat Apr 30 16:58:00 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 30 Apr 2016 16:58:00 +0200 Subject: [Scilab-users] Circular contour plot In-Reply-To: <57236325.609@hslmg.de> References: <57233EB1.7060509@hslmg.de> <57236325.609@hslmg.de> Message-ID: <5724C7F8.5020300@free.fr> Le 29/04/2016 15:35, Jens Simon Strom a ?crit : > Hallo Rafael, your script is perfect, mine isn't. Where is the bug? in contourd2di() called by contour2d(). As a workaround, you may use: R=1.; //Radius Erde a=50;//Abstand Mond - Erde g0=1; //Schwerebeschleunigung des Mondes im Zentrum der Erde VLev=[-0.02:0.002:0.02]; //Werte der ?quipotenziallinien-Kandidaten n=400;//Anzahl der x- und y-Werte clf f = gcf(); f.color_map = zeros(100,3); //Colormap an = linspace(0,2*%pi,400); x = a+R*sin(an); y = R*cos(an); plot(x,y,"-w") ca=gca(); ca.isoview="on"; p = ca.children(1).children; p.thickness=4; p.data(:,3) = 0.1; x=linspace(a-R,a+R,n); y=linspace(-R,R,n); //Erdgebiet [X,Y]=ndgrid(x,y); V=-g0*(X+a^2../sqrt(X.^2+Y.^2)-2*a); pos=((X-a).^2+Y.^2 > R^2); V(pos) = -%inf; xset("fpf","") //Keine Levelanzeige, Reaktion erst nach dem 2. Lauf philev=contour2d(x,y,V, VLev)//Plot und dargestellte ?quipotenziallinien ... and report the bug. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Sat Apr 30 20:23:58 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sat, 30 Apr 2016 20:23:58 +0200 Subject: [Scilab-users] Circular contour plot In-Reply-To: <5724C7F8.5020300@free.fr> References: <57233EB1.7060509@hslmg.de> <57236325.609@hslmg.de> <5724C7F8.5020300@free.fr> Message-ID: <5724F83E.40308@hslmg.de> Thanks Samuel! Perfect workaround: -%inf instead of %nan to get the circle. -------------------------------------------------------------------------------------------------------------------------------------- Am 30.04.2016 16:58, schrieb Samuel Gougeon: > Le 29/04/2016 15:35, Jens Simon Strom a ?crit : >> Hallo Rafael, >> your script is perfect, mine isn't. Where is the bug? > in contourd2di() called by contour2d(). > > As a workaround, you may use: > R=1.; //Radius Erde > a=50;//Abstand Mond - Erde > g0=1; //Schwerebeschleunigung des Mondes im Zentrum der Erde > VLev=[-0.02:0.002:0.02]; //Werte der ?quipotenziallinien-Kandidaten > n=400;//Anzahl der x- und y-Werte > > clf > f = gcf(); > f.color_map = zeros(100,3); //Colormap > > an = linspace(0,2*%pi,400); > x = a+R*sin(an); > y = R*cos(an); > plot(x,y,"-w") > ca=gca(); > ca.isoview="on"; > p = ca.children(1).children; > p.thickness=4; > p.data(:,3) = 0.1; > > x=linspace(a-R,a+R,n); > y=linspace(-R,R,n); //Erdgebiet > [X,Y]=ndgrid(x,y); > V=-g0*(X+a^2../sqrt(X.^2+Y.^2)-2*a); > pos=((X-a).^2+Y.^2 > R^2); > V(pos) = -%inf; > xset("fpf"," ") //Keine Levelanzeige, Reaktion erst nach dem 2. Lauf > philev=contour2d(x,y,V, VLev)//Plot und dargestellte ?quipotenziallinien > > ... and report the bug. > > Samuel > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: